SA-MP Forums Archive
Help - 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: Help (/showthread.php?tid=262251)



Help - sampfans - 17.06.2011

i need cmd for respawn all unused car please give me
thanks


Re: Help - Lorenc_ - 17.06.2011

pawn Код:
CMD:respawn(playerid, params[])
{
    for(new i; i < MAX_VEHICLES; i++)
    {
        RespawnVehicle(i);//Not sure if its a function...
    }
    return 1;
}



Re: Help - PrawkC - 17.06.2011

* Fixed

Uses ZCMD, might be a bad way of doing it, but its short and sweet.
Also for future note, this is NOT a request board.

pawn Код:
CMD:respawncars(playerid, params[])
{
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        if(IsVehTaken(i) == 0)
        {
            SetVehicleToRespawn(i)
        }
    }
}

stock IsVehTaken(vid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(vid == GetPlayerVehicleID(i))
        {
            return 1;
        }
    }
    return 0;
}
Didn't know SetVehicleToRespawn existed.


Re: Help - sampfans - 17.06.2011

what include for this CMD ?


Re: Help - Lorenc_ - 17.06.2011

ZCMD by ZeeX