destroy object for player - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: destroy object for player (
/showthread.php?tid=177351)
destroy object for player -
FireCat - 17.09.2010
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;
}
|
Re: destroy object for player -
Mike_Peterson - 17.09.2010
edit: errm you mean like more people can do /lighton
Re: destroy object for player -
Mike_Peterson - 17.09.2010
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;
}