[Ajuda] Gasolina
#3

Podemos usar de uma forma melhor e sem criar public

PHP код:
if(dialogid == DialogCombustivel)
{
     new 
total GetPlayerVehicleID(playerid);
      if(
Gasolina[total] >= 100) return SendClientMessage(playerid,COLOR_RED,"Posto XVL: O tanque jб estб cheio.");
       if(
response)
       {
        if(
listitem == 0)
         {
               
Gasolina[total] += 50;
               
GivePlayerMoneyEx(playerid,-40);
               
SendClientMessage(playerid0xFF0000FF"Vocк abasteceu seu tanque com 50 Litros de Gasolina Comum !");
               if(
Gasolina[GetPlayerVehicleID(playerid)] > 100) return Gasolina[GetPlayerVehicleID(playerid)] = 100;
         }
          if(
listitem == 1)
           {
            
Gasolina[total] += 80;
            
GivePlayerMoneyEx(playerid,-90);
            
SendClientMessage(playerid0xFFFF00FF"Vocк abasteceu seu tanque com 80 Litros de Gasolina Aditivada !");
            if(
Gasolina[GetPlayerVehicleID(playerid)] > 100) return Gasolina[GetPlayerVehicleID(playerid)] = 100;
        }
        if(
listitem == 2)
        {
            
Gasolina[total] += 100;
            
GivePlayerMoneyEx(playerid,-150);
            
SendClientMessage(playerid0x7FFF00FF"Vocк completou seu tanque com 100 Litros de Gasolina !");
            if(
Gasolina[GetPlayerVehicleID(playerid)] > 100) return Gasolina[GetPlayerVehicleID(playerid)] = 100;
        }
    }
     return 
1;

Reply


Messages In This Thread
Gasolina - by Wendell - 29.11.2013, 19:34
Re: Gasolina - by Rosario_MZ - 29.11.2013, 19:50
Re: Gasolina - by Petrick™ - 29.11.2013, 20:15
Re: Gasolina - by Wendell - 30.11.2013, 01:38

Forum Jump:


Users browsing this thread: 1 Guest(s)