Making cars never respawn
#1

I have create vehicle but I want it so when the vehicle blows up it doesnt respawn how can I do that?
Reply
#2

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;
}
Reply
#3

I have /spawncar [id] [color] [color] how would I make it so ever car doesnt respawn
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)