View Single Post
Old 04/08/2011, 04:48 AM   #2
andrew4699
Little Clucker
 
Join Date: Jul 2010
Posts: 36
Reputation: 1
Default Re: Respawn vehicles

Code:
dcmd_rav(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 3|| IsPlayerAdmin(playerid))
    {
        for(new i = 0; i < MAX_VEHICLES; i++)
        {
            for(new x = 0; x < MAX_PLAYERS; x++)
            {
                if(!IsPlayerInAnyVehicle(x))
                {
                    SetVehicleToRespawn(i);
                }
            }
        }
        SendClientMessageToAll(COLOR_GREEN,"All Vehicles Have Been Respawned To Their Default Spawn      Positions By An Admin.");
        SendClientMessage(playerid,COLOR_LIGHTBLUE,"You Respawned All The Vehicles.");
    } else return SendClientMessage(playerid,red,"Invalid Command. Type   /cmds   For A List Of All Available Server Commands.");
}
andrew4699 is offline