Making cars never respawn - 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: Making cars never respawn (
/showthread.php?tid=441940)
Making cars never respawn -
lramos15 - 04.06.2013
I have create vehicle but I want it so when the vehicle blows up it doesnt respawn how can I do that?
Re: Making cars never respawn -
[KHK]Khalid - 04.06.2013
https://sampwiki.blast.hk/wiki/OnVehicleSpawn
pawn Код:
// create a per-vehicle global variable to tell whether you want a vehicle to be respawned or not
new NoRespawn[MAX_VEHICLES];
// now when creating a vehicle which you don't want it to be respawned
new id;
id = CreateVehicle(...);
NoRespawn[id] = 1; // setting it to 1 which means: Do not respawn!
public OnVehicleSpawn(vehicleid) // called when a vehicle spawns
{
if(NoRespawn[vehicleid] == 1) // if the value of NoRespawn variable of 'vehicleid' is equal to 1
{
DestroyVehicle(vehicleid); // destroy it
}
return 1;
}
Re: Making cars never respawn -
lramos15 - 05.06.2013
I have /spawncar [id] [color] [color] how would I make it so ever car doesnt respawn