AR/createMarker: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} هذه الوظيفة تستخدم لصنع ماركر . There are various limits that govern the maximum number of each type that can be...")
 
 
(7 intermediate revisions by one other user not shown)
Line 2: Line 2:
{{Server client function}}
{{Server client function}}
هذه الوظيفة تستخدم لصنع ماركر .
هذه الوظيفة تستخدم لصنع ماركر .
There are various limits that govern the maximum number of each type that can be visible at once. These are:
* Coronas: 32
* Checkpoints, Rings, Cylinders and Arrows combined: 32
You are able to create as many markers as you wish (memory and element limit permitting), but the player will only be able to see the nearest ones up to the limit.


==Syntax==
==Syntax==
Line 22: Line 16:
===Optional arguments===
===Optional arguments===
{{OptionalArg}}
{{OptionalArg}}
* '''theType''': The visual type of the marker to be created. Possible values:
* '''theType''': نوع الماركر,شكل الماركر:
{{Marker_types}}
* '''size''': حجم الماركر الذي تريد صنعه.
* '''size''': حجم الماركر الذي تريد صنعه.
* '''r''': (0 - 255)نسبة اللون الاحمر بالماركر بين.
* '''r''': (0 - 255)نسبة اللون الاحمر بالماركر بين.
Line 29: Line 22:
* '''b''': (0 - 255)نسبة اللون الازرق بالماركر بين.
* '''b''': (0 - 255)نسبة اللون الازرق بالماركر بين.
* '''a''': (0 - 255)نسبة ظهور الماركر 0 = مخفي ,وبعدها يبدأ يظهر
* '''a''': (0 - 255)نسبة ظهور الماركر 0 = مخفي ,وبعدها يبدأ يظهر
* '''visibleTo''': This defines which elements can see the marker. Defaults to visible to everyone. See [[visibility]].
* '''visibleTo''': الالمنت الذي يستطيع رؤية الماركر [[visibility]].
</section>
</section>
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
Line 43: Line 36:
===Optional arguments===
===Optional arguments===
{{OptionalArg}}
{{OptionalArg}}
* '''theType''': The visual type of the marker to be created. Possible values:
* '''theType''': نوع الماركر,شكل الماركر
{{Marker_types}}
* '''size''': حجم الماركر الذي تريد صنعه.
* '''size''': حجم الماركر الذي تريد صنعه.
* '''r''': (0 - 255)نسبة اللون الاحمر بالماركر بين.
* '''r''': (0 - 255)نسبة اللون الاحمر بالماركر بين.
Line 68: Line 60:
   end
   end
end
end
addCommandHandler ( "createmarker", consoleCreateMarker )
addCommandHandler ( "createmarker", consoleCreateMarker ) -- عند الكتابة في ف8
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
Line 75: Line 67:
{{Marker functions}}
{{Marker functions}}
[[ru:createMarker]]
[[ru:createMarker]]
[[en:createMarker]]

Latest revision as of 14:03, 8 November 2016

هذه الوظيفة تستخدم لصنع ماركر .

Syntax

Click to collapse [-]
Server
marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255, visibleTo = getRootElement( ) ] )

OOP Syntax Help! I don't understand this!

Method: Marker(...)


Required Arguments

  • x: احداثيات الماركر x.
  • y: احداثيات الماركر y.
  • z: احداثيات ارتفاع الماركر z.

Optional arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • theType: نوع الماركر,شكل الماركر:
  • size: حجم الماركر الذي تريد صنعه.
  • r: (0 - 255)نسبة اللون الاحمر بالماركر بين.
  • g: (0 - 255)نسبة اللون الاخضر بالماركر بين.
  • b: (0 - 255)نسبة اللون الازرق بالماركر بين.
  • a: (0 - 255)نسبة ظهور الماركر 0 = مخفي ,وبعدها يبدأ يظهر
  • visibleTo: الالمنت الذي يستطيع رؤية الماركر visibility.
Click to collapse [-]
Client
marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] )

OOP Syntax Help! I don't understand this!

Method: Marker(...)


Required Arguments

  • x: احداثيات الماركر x.
  • y: احداثيات الماركر y.
  • z: احداثيات ارتفاع الماركر z.

Optional arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • theType: نوع الماركر,شكل الماركر
  • size: حجم الماركر الذي تريد صنعه.
  • r: (0 - 255)نسبة اللون الاحمر بالماركر بين.
  • g: (0 - 255)نسبة اللون الاخضر بالماركر بين.
  • b: (0 - 255)نسبة اللون الازرق بالماركر بين.
  • a: (0 - 255)نسبة ظهور الماركر 0 = مخفي ,وبعدها يبدأ يظهر .

Example

Click to collapse [-]
Example 1

هذا المثال يصنع ماركر بجانب الاعب:

function consoleCreateMarker ( thePlayer, commandName )
   if ( thePlayer ) then
      local x, y, z = getElementPosition ( thePlayer ) --يجيب احداثيات الاعب
      -- صنع ماركر بجانب الاعب:
      local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 )
      if ( theMarker ) then 
         outputConsole ( "تم صنع الماركر بنجاح", thePlayer )
      else
         outputConsole ( "خطأ في صنع الماركر", thePlayer )
      end
   end
end
addCommandHandler ( "createmarker", consoleCreateMarker ) -- عند الكتابة في ف8

See Also

Shared