[Ajuda] JFS Velocimetro
#2

pawn Код:
new playerid;
public CheckGas()
{
    for(new i=0;i<MAXPLAYERSJFS;i++)
    {
        if(IsPlayerConnected(i))
        {
            new vehicle = GetPlayerVehicleID(i);
            if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
            {
                if(Gas[vehicle] >= 1)
                {
                    Gas[vehicle]--;
                }
                if(Gas[vehicle] < 1)
                {
                    SemGasolina[i] = 1;
                    TogglePlayerControllable(i, 1);
                    SendClientMessage(i, -1, "[INFO] Acabou a Gasolina ! Chame um Mecanico /servico mecanico");
                    RemovePlayerFromVehicle(playerid);
                }
            }
        }
    }
    return 1;
}
TogglePlayerControllable (Wiki)

Parameters:
(playerid, toggle)
playerid The ID of the player to toggle the controllability of
toggle 0 to make them uncontrollable, 1 to make them controllable.
Reply


Messages In This Thread
JFS Velocimetro - by alexandrealx - 15.09.2014, 14:53
Re: JFS Velocimetro - by JonathanFeitosa - 15.09.2014, 14:55
Re: JFS Velocimetro - by alexandrealx - 15.09.2014, 15:02

Forum Jump:


Users browsing this thread: 1 Guest(s)