[Pedido] Galao De Gasolina
#4

@ edit atualizei o codigo para testar se o player tem grana !

pawn Код:
enum pInfo
{
    pGalao
};
new PlayerInfo[MAX_PLAYERS][pInfo];

CMD:comprargalao(playerid)
{
    if(PlayerToPoint(2.0, playerid, -30.875, -88.9609, 1004.53)) // atualizei
    {
        if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, -1,"Vocк nгo tem 20 Mangos !");
        PlayerInfo[playerid][pGalao] += 1;
        GivePlayerMoney(playerid, -20); // 1 Galao Custa 20.00
        SendClientMessage(playerid, -1, "Voce Comprou 1 Galao de Gasolina por R$ 20.00");
        return true;
    }
    else{SendClientMessage(playerid, -1, "Vocк Nгo Esta No Lugar Certo !");return true;}
}
CMD:usargalao(playerid)
{
    if(PlayerInfo[playerid][pGalao] < 1) return SendClientMessage(playerid,-1, "Vocк nгo tem 1 Galгo !");
    new ID = GetPlayerVehicleID(playerid);
    VariaveldaGasolina[ID] += 10; // 1 Galao = 10 Litros
}
codigo e so uma base !
Reply


Messages In This Thread
Galao De Gasolina - by Lucas_Rocha - 23.09.2012, 16:58
Re: Galao De Gasolina - by Coringa_Vilao - 23.09.2012, 17:03
Re: Galao De Gasolina - by Lucas-Fc - 23.09.2012, 17:05
Re: Galao De Gasolina - by Gii - 23.09.2012, 17:13
Re: Galao De Gasolina - by Gii - 23.09.2012, 17:45
Respuesta: Re: Galao De Gasolina - by Lucas_Rocha - 23.09.2012, 17:53
Re: Galao De Gasolina - by humildadeforever - 23.09.2012, 18:05
Re: Galao De Gasolina - by Rhayziin - 23.09.2012, 18:07
Respuesta: Re: Galao De Gasolina - by Lucas_Rocha - 23.09.2012, 19:01
Re: Respuesta: Re: Galao De Gasolina - by lucasfr1425 - 23.09.2012, 19:30

Forum Jump:


Users browsing this thread: 7 Guest(s)