[Pedido] lc
#2

pawn Код:
stock IsVehicleOccupied(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER)
            {
                if(GetPlayerVehicleID(i) == vehicleid)
                {
                    return 1;
                }
            }
        }
    }
    return 0;
}
pawn Код:
if(strcmp(cmd, "/rvu", true) == 0)
    {
        if(IsPlayerAdmin(playerid)
        {
            for(new v = 0; v < MAX_VEHICLES; v++)
            {
                if(!IsVehicleOccupied(v)) SetVehicleToRespawn(v);
            }

        }
        return 1;
    }
Reply


Messages In This Thread
lc - by yoki - 17.05.2014, 02:47
Re: lc - by MultiKill - 17.05.2014, 03:01

Forum Jump:


Users browsing this thread: 1 Guest(s)