Veh respawner
#1

Hello, can someone make me filterscript that destroys car what are not used . It is very bad that player uses car and leaves car somwhere and car and it wont destroy .
i cant found it anywere.


Sorry my bad english.
Reply
#2

All you have to do is change the respawn_time argument of the function that's creating it, most likely CreateVehicle if it's never respawning after being left alone for a long time. See this page on the SA-MP Wiki for more information:

https://sampwiki.blast.hk/wiki/CreateVehicle
Reply
#3

pawn Код:
//On the top:
#define TIMER_TO_RESPAWN 5000 //change if want

//Put in OnGameModeInit:

SetTimer("RespawnAllVehicles", TIMER_TO_RESPAWN, true);

//Put in end of your gamemode/filterscript:

forward RespawnAllVehicles();
public RespawnAllVehicles()
{
    new playerid;
    for(new i = 0; i < MAX_VEHICLES; ++i)
    {
        do
        {
            if(!IsPlayerInVehicle(playerid, i)) SetVehicleToRespawn(i);
            playerid++;
        }
        while(playerid < MAX_PLAYERS);
    }
    return true;
}
Reply
#4

Thanks for that i get it, but this is not what i mean .

i want the script destroys cars what are not in use.

i have in server command /destroycar but anywon wont use it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)