Need fs or pawn : Respawncars all the server or anti car spaming in the air
#6

Quote:
Originally Posted by jesdynguyen
Посмотреть сообщение
thanks a lot but...

error i cant add your pawn
Do you have scripting experience? Or probably, you are using a downloaded GM?

pawn Код:
stock IsVehicleOccupied(vehicleid)
{
    for(new i = 0; i != MAX_PLAYERS; ++i)
    {
        if(GetPlayerVehicleID(i) == vehicleid && GetPlayerVehicleSeat(i) == 0) return 1;
    }
    return 0;
}

stock RespawnUnoccupiedVehicles()
{
    for(new i = 1; i != MAX_VEHICLES; ++i)
    {
        if(!IsVehicleOccupied(i) && IsValidVehicle(i))
        {
            SetVehicleToRespawn(i);
        }
    }
}
In a cmd:

pawn Код:
CMD:respawnallcars(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, 0xFF0000AA, "Not allowed to use this."), return 0;
    RespawnUnoccupiedVehicles();
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)