Respawning Vehs
#3

PHP код:
CMD:respawncars(playerid,params[])
{
    
#pragma unused params
    
if(PlayerInfo[playerid][Level] >= 10 || IsPlayerAdmin(playerid))
    {
        
SendClientMessage(playeridgreen"|- Your have Successfully Respawned all Vehicles! -|");
        for(new 
v=0v<MAX_VEHICLESv++)
        {
            if(!
IsVehicleOccupied(v))
            {
                
SetVehicleToRespawn(v);
            }
        }
        return 
1;
    }
    else return 
SendClientMessage(playeridCOLOR_RED"You need to be admin level 10 to use this cmd!");

Next add this
PHP код:
stock IsVehicleOccupied(vehicleid)
{
    for(new 
i=0;i<MAX_PLAYERS;i++)
    {
        if(
IsPlayerInVehicle(i,vehicleid)) return 1;
    }
    return 
0;

Reply


Messages In This Thread
Respawning Vehs - by zamaleksc - 24.12.2015, 14:29
Re: Respawning Vehs - by Ritzy2K - 24.12.2015, 14:33
Re: Respawning Vehs - by Amunra - 24.12.2015, 14:50
Re: Respawning Vehs - by zamaleksc - 24.12.2015, 14:52
Re: Respawning Vehs - by Amunra - 24.12.2015, 15:04
Re: Respawning Vehs - by zamaleksc - 24.12.2015, 15:37
Re: Respawning Vehs - by Amunra - 24.12.2015, 15:43
Re: Respawning Vehs - by Ritzy2K - 24.12.2015, 15:45
Re: Respawning Vehs - by Amunra - 24.12.2015, 16:00
Re: Respawning Vehs - by TwinkiDaBoss - 24.12.2015, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)