[Ajuda] Combustнvel nгo desconta
#1

Olб users, estou enfrentando um problema com a quantia de combustнvel no players.

O problema й que a textdraw ela й apresentada, porйm, onde й para descontar o combustнvel nгo estб descontando:
PHP код:
--InfoPlayer[i][Combustivel]; 
Alguйm poderia me ajudar? Nesse cуdigo estб restringindo caso o usuбrio esteja em uma bicicleta, que nгo precisa de combustнvel.

PHP код:
forward CombustivelVeiculo();
public 
CombustivelVeiculo() {
    for(new 
iMAX_PLAYERSi++) {
        if(
GetPlayerState(i) == PLAYER_STATE_DRIVER && InfoPlayer[i][Combustivel] == && !IsPlayerInVehicle(i481) && !IsPlayerInVehicle(i509) && !IsPlayerInVehicle(i510)) return RemovePlayerFromVehicle(i);
        if(
GetPlayerState(i) == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(i)) != 481 && GetVehicleModel(GetPlayerVehicleID(i)) != 509 && GetVehicleModel(GetPlayerVehicleID(i)) != 510) {
            if(
xCPlayer[i] == 0)
            {
                
GetPlayerPos(ixCPlayer[i],yCPlayer[i],zCPlayer[i]);
            }
            else
            {
                if(
IsPlayerInRangeOfPoint(i850xCPlayer[i], yCPlayer[i], zCPlayer[i])) return 0;
                else
                {
                    --
InfoPlayer[i][Combustivel];
                    
TextDrawHideForPlayer(iCombustivelT[i]);
                    
GetPlayerPos(ixCPlayer[i],yCPlayer[i],zCPlayer[i]);
                    
format(formatosizeof(formato),"~y~~h~Combustivel:~w~ %i"InfoPlayer[i][Combustivel]);
                    
TextDrawSetString(CombustivelT[i],formato);
                    
TextDrawShowForPlayer(iCombustivelT[i]);
                }
            }
            
            if(
InfoPlayer[i][Combustivel] == || InfoPlayer[i][Combustivel] == 2)
            {
                
SendClientMessage(i0xFF0808AA"Seu combustнvel estб acabando, vб atй um posto de gasolina mais prуximo!");
                
PlayerPlaySound(i10570.00.010.0);
                   return 
0;
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Combustнvel nгo desconta - by Ley - 29.05.2018, 21:40
Re: Combustнvel nгo desconta - by PT - 29.05.2018, 22:05
Re: Combustнvel nгo desconta - by AutoMatic2 - 29.05.2018, 22:14
Re: Combustнvel nгo desconta - by Cleyson - 30.05.2018, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)