Destroy Object Help - 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)
+--- Thread: Destroy Object Help (
/showthread.php?tid=346326)
Destroy Object Help -
Chenko - 28.05.2012
Alright, I am editing Vortex 1 and I am making a command to place road blocks for the LSPD. I understand how to spawn the objects in front of the player and such but how would I be able to make it so when someone goes to it and does /removerb the object is destroyed?
Thanks for any help you can provide.
Re: Destroy Object Help -
iGetty - 28.05.2012
Well;
Do this.
pawn Код:
new RoadBlock;
command(yourcommand, playerid, params[]);
{
RoadBlock = CreateObject(....);
}
command(removerb, playerid, params[])
{
DestroyObject(RoadBlock);
}
Learn from that and you're fine.
Re: Destroy Object Help -
Chenko - 28.05.2012
Quote:
Originally Posted by iGetty
Well;
Do this.
pawn Код:
new RoadBlock;
command(yourcommand, playerid, params[]); { RoadBlock = CreateObject(....); }
command(removerb, playerid, params[]) { DestroyObject(RoadBlock); }
Learn from that and you're fine.
|
Thanks, I'll try that now.