[Ajuda] Gasolina
#7

PHP код:
public CheckGas()
{
    new 
string[128];
    for(new 
i=0;i<MAX_PLAYERS;i++)
    {
        if(
IsPlayerConnected(i))
           {
               
SetPlayerWantedLevel(iWantedPoints[i]);
               if(
GetPlayerState(i) == PLAYER_STATE_DRIVER)
               {
                   new 
vid GetPlayerVehicleID(i);
                 if(
GetVehicleModel(GetPlayerVehicleID(i)) != 481 && 510)
                   {
                    if(
Gas[vid] >= 1)
                    {
                        
//format(string, sizeof(string), "~p~Gasolina: ~w~%d~p~ R: ~w~%d",Gas[vid],Marchas[i][1]);
                        
format(stringsizeof(string), "~p~Gasolina: ~w~%d",Gas[vid]);
                           if(
Gas[vid] <= 10)
                            
PlayerPlaySound(i10850.00.00.0);
                          if(
Teste[i] == && Player[i][LastSpeed] > 10 && GetVehicleModel(vid) != 462 && GetVehicleModel(vid) != 481 && GetVehicleModel(vid) != 510)
                          {
                              
tempGas[vid] ++;
                              if(
tempGas[vid] >= 20)
                              {
                                  
tempGas[vid] = 0;
                                
Gas[vid]--;
                            }
                        }
                       }
                       else
                       {
                        if(
Teste[i] == 0)
                        {
                              
NoFuel[i] = 1;
                               
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,0,0,0,0,0,0);
                               
GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~veўculo sem combustўvel",1500,6);
                           }
                    }
                } 
Reply


Messages In This Thread
[Ajuda] Gasolina - by ' Bigode - 12.10.2011, 21:11
Re: [Duvida] Gasolina - by Hardware - 12.10.2011, 21:13
Re: [Duvida] Gasolina - by Cristhian - 12.10.2011, 21:14
Re: [Duvida] Gasolina - by ' Bigode - 12.10.2011, 21:15
Re: [Duvida] Gasolina - by Dolby - 12.10.2011, 21:17
Re: [Duvida] Gasolina - by Hardware - 12.10.2011, 21:18
Re: [Duvida] Gasolina - by ' Bigode - 12.10.2011, 21:21
Re: [Duvida] Gasolina - by Cristhian - 12.10.2011, 21:35
Re: [Duvida] Gasolina - by ' Bigode - 12.10.2011, 21:46
Re: [Duvida] Gasolina - by Dolby - 12.10.2011, 21:47

Forum Jump:


Users browsing this thread: 3 Guest(s)