destroy object for player
#1

how can i destroy a object just for 1 player then if he makes a command it appears for another like,
i have the flare i put /lighton and it attach's it to him then /lightoff it destroys and then when another persons puts /lighton it dosnt appear because its destroyed how can i change that -.-?
Quote:

if (strcmp("/lighton", cmdtext, true, 10) == 0)
{
AttachObjectToPlayer(flare, playerid, 0.0, 2.5, 0.0, 0.0, 0.0, 0.0);
return 1;
}
if (strcmp("/lightoff", cmdtext, true, 10) == 0)
{
DestroyObject(flare);
return 1;
}

Reply
#2

edit: errm you mean like more people can do /lighton
Reply
#3

untested maybe work
tell me if worked
Код:
if (strcmp("/lighton", cmdtext, true, 10) == 0)
{
new x,y,z;
GetPlayerPos(playerid,x,y,z)
CreatePlayerObject(playerid,354,x,y,z,0,0,0);
AttachPlayerObjectToPlayer(playerid,flare,playerid,0.0,2.5,0,0,0,0);
return 1;
}
if (strcmp("/lightoff", cmdtext, true, 10) == 0)
{
DestroyPlayerObject(playerid,flare);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)