SA-MP Forums Archive
Respawn All Vehicles On Server [SOLVED] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Respawn All Vehicles On Server [SOLVED] (/showthread.php?tid=252539)



Respawn All Vehicles On Server [SOLVED] - ApachE - 01.05.2011

Hi again...
Well i can't find how to do that.

I try to make commad with DestroyVehicle and it works but that vehicles just disapear from server, i just destroy it.
So i don't want to do that, i want to respawn all vehicles so they go on theri usually spawn position.
Can you give me some example, please.


Re: Respawn All Vehicles On Server [HELP] - MadeMan - 01.05.2011

pawn Код:
for(new i=1; i < MAX_VEHICLES; i++)
{
    SetVehicleToRespawn(i);
}



Re: Respawn All Vehicles On Server [HELP] - ApachE - 01.05.2011

Ok from that i make:

pawn Код:
if (!strcmp(cmdtext,"/respawnajvozila"))
        {
                for(new i=1; i < MAX_VEHICLES; i++)
                {
                    SetVehicleToRespawn(i);
                }
                SendClientMessage(playerid, 0x33CCFFAA, "Vozila respawnana!");
                return 1;
        }
And it works like a charm, Respect MadeMan!! Thank you very much.