Lumaktaw patungo sa pangunahing content

AttachPlayerObjectToPlayer

Description

The same as AttachObjectToPlayer but for objects which were created for player.

NameDescription
playeridThe id of the player which is linked with the object.
objectidThe objectid you want to attach to the player.
parentidThe id of the player you want to attach to the object.
Float:offsetXThe distance between the player and the object in the X direction.
Float:offsetYThe distance between the player and the object in the Y direction.
Float:offsetZThe distance between the player and the object in the Z direction.
Float:rotationXThe X rotation.
Float:rotationYThe Y rotation.
Float:rotationZThe Z rotation.

Returns

This function does not return any specific values.

Examples

new gPlayerObject[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
gPlayerObject[playerid] = CreatePlayerObject(playerid, 2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0);

AttachPlayerObjectToPlayer(playerid, gPlayerObject[playerid], other_playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2.0);
return 1;
}

Notes

warning

This function was removed in SA-MP 0.3.