Attach object
#2

Код:
new PlayerObjectTimer[MAX_PLAYERS];

OnPlayerDisconnect/OnPlayerConnect:
KillTimer(PlayerObjectTimer[playerid]);

to the end:
CMD:yourcmd(playerid,params[])
{
SetPlayerAttached(playerid, 0, modelid, bone, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
PlayerObjectTimer[playerid] = SetTimerEx("ObjectDelete",10000,false,"i",playerid);
return 1;
}

forward ObjectDelete(playerid);
public ObjectDelete(playerid)
{
RemovePlayerAttachedObject(playerid, 0);
return KillTimer(PlayerObjectTimer[playerid]);
}
Reply


Messages In This Thread
Attach object - by Micko123 - 18.05.2016, 19:00
Re: Attach object - by Stuntff - 18.05.2016, 19:09

Forum Jump:


Users browsing this thread: 1 Guest(s)