SA-MP Forums Archive
DestroyObject - 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: DestroyObject (/showthread.php?tid=531328)



DestroyObject - EmrysXD - 12.08.2014

when i put this code under OnVehicleSpawn,it will destroy all neon/spoiler in my server.
are there any method to destroy the object by vehicleid? i mean i want it to destroy the object for respawned vehicle.not for all vehicle.

Код:
public OnVehicleSpawn(vehicleid)
{
    
   	DestroyObject(Spoiler[0]);
   	DestroyObject(neon[1]);
	DestroyObject(neon[0]);
   	Neon[vehicleid][HasNeon] = 0;
   	Neon[vehicleid][NeonActive] = 0;
	return 1;
}