[Ajuda] Programar "/rv" para apenas veнculos nгo ocupados.
#4

Quote:
Originally Posted by LucasTop
View Post
Coloquei isto, compilou de boa, mas ainda fica respawnando os carros usados. E agora?
pawn Code:
o topico tava /rv


se vocк quizer /rvu

for(new v = 0; v < MAX_VEHICLES; v++)
            {
                if(!IsVehicleOccupied(v)) SetVehicleToRespawn(v);
            }


// stock
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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)