AR/setElementPosition

From Multi Theft Auto: Wiki
Revision as of 16:20, 17 April 2016 by Jaber (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

هذه الوظيفة تستخدم لنقل الالمنت او الشيئ لاحداثيات محددة.

Attention: Do not use this function to spawn a player. It will cause problems with other functions like warpPedIntoVehicle.
Use spawnPlayer instead.

Syntax

bool setElementPosition ( element theElement, float x, float y, float z [, bool warp = true ] )  

OOP Syntax Help! I don't understand this!

Method: element:setPosition(...)
Variable: .position
Counterpart: getElementPosition


شرح الارقمنتات

  • theElement: الالمنت الذي تريد جلب احداثيات.
  • x: الاحداثيات x.
  • y: الاحداثيات y.
  • z: الاحداثيات z.

Optional Arguments

  • warp: ان كنت تريد نقل الاعب.

Returns

Returns true if the function was successful, false otherwise.

Example

Click to collapse [-]
Example 1

هذه الوظيفة عند كتابة امر باف8 تقوم بنقل الاعب.

function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ )
	setElementPosition ( source, posX, posY, posZ )
end
addCommandHandler ( "setpos", consoleSetPlayerPosition  )
Click to expand [+]
Example 2
Click to expand [+]
Example 3

See Also