SA-MP Forums Archive
Respawn cars - 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 cars (/showthread.php?tid=166660)



Respawn cars - FireCat - 09.08.2010

how can i like put /respawncars? i saw once on luxadmin but iv downloaded some and i cant find it anymore help!!
_______________________
[GDZ]leader



Re: Respawn cars - ipsBruno - 09.08.2010

Search is God
pawn Code:
//
    if(!strcmp(cmdtext, "/respawncar", true))
    {
        for(new i = 0; i < MAX_VEHICLES; i++)
        {
         SetVehicleToRespawn(i);
        }
        return 1;
     }



Re: Respawn cars - Ritchie999 - 09.08.2010

Here is a better one. It will only respawn empty vehicles

pawn Code:
if(strcmp(cmd, "/respawnvehicles", true) == 0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 5)
        {
            for(new i=0;i<MAX_VEHICLES;i++)
            {
                if(IsVehicleOccupied(i) == 0)
                {
                    SetVehicleToRespawn(i);
                }
            }
            format(string, sizeof(string), "[INFO:] Unoccupied vehicles respawned by %s.", GetPlayerNameEx(playerid));
            SendClientMessageToAll(COLOR_ADMINCMD, string);
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Your not an administrator.");
        }
        return 1;
    }