respawn veh bug
#4

this isn't mine, but it'll work Fine Try It,
Код:
CMD:respawnallcars(playerid,params[])
{
        if(PlayerInfo[playerid][pAdmin] <= 5) return SendClientMessage(playerid, 0xFF0000FF, "You are not authorized to use that command!");
        for(new car = 1; car <= 268; car++)
        {
                if(IsVehicleEmpty(car)) SetVehicleToRespawn(car);
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
        BroadCast(0xFFFFFFFF,string);
        return 1;
}
 
stock IsVehicleEmpty(vehicleid)
{
        for(new i=0; i<MAX_PLAYERS; i++)
        {
                if(IsPlayerInVehicle(i, vehicleid)) return 0;
        }
        return 1;
}
Reply


Messages In This Thread
respawn veh bug - by AliEnPi - 21.06.2016, 14:09
Re: respawn veh bug - by TwinkiDaBoss - 21.06.2016, 14:20
Re: respawn veh bug - by AliEnPi - 21.06.2016, 14:38
Re: respawn veh bug - by AliBro - 21.06.2016, 15:16

Forum Jump:


Users browsing this thread: 1 Guest(s)