Przejdź do głównej zawartości

SetPlayerObjectPos

Description

Sets the position of a player-object to the specified coordinates.

NameDescription
playeridThe ID of the player whose player-object to set the position of.
objectidThe ID of the player-object to set the position of. Returned by CreatePlayerObject.
Float:xThe X coordinate to put the object at.
Float:yThe Y coordinate to put the object at.
Float:zThe Z coordinate to put the object at.

Returns

true - The function executed successfully.

false - The function failed to execute. Player and/or object do not exist.

Examples

new gPlayerObject[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
gPlayerObject[playerid] = CreatePlayerObject(playerid, 2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0);
return 1;
}

// Later
SetPlayerObjectPos(playerid, gPlayerObject[playerid], 2001.195679, 1547.113892, 14.283400);