AR/createMarker

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

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