[Ajuda] Iscas
#9

PHP Code:

        
case DIALOG_COMPRARISCAS:
        {
            if(!
response) return 0;    
            if(!
IsNumeric(inputtext))
                return 
SendClientMessage(playerid, -1"[Pescadores] Apenas nъmeros.");
            if(
isnull(inputtext))
                return 
SendClientMessage(playerid, -1"[Pescadores] Vocк nгo digitou nada.");
            if(
strval(inputtext) > 100)
                return 
SendClientMessage(playerid, -1"[Pescadores] Valor muito alto.");
            if(
Player[playerid][Iscas] == 100)
                return 
SendClientMessage(playerid, -1"[Pescadores] Vocк jб tem o mбximo de iscas.");
            if(
Player[playerid][Iscas] + strval(inputtext) > 100)
            {
                new 
result 100 Player[playerid][Iscas];
                
Player[playerid][Iscas] += result;
                
SalvarDados(playerid);
                
GivePlayerMoney(playerid, - 30 result);
                
format(StringAsizeof(StringA), "[Pescadores] Vocк comprou %d iscas"result);
                
format(Dialogsizeof(Dialog), "[Pescadores] Agora vocк tem %d iscas. -$%d"Player[playerid][Iscas], 30 result);
                
SendClientMessage(playerid, -1StringA);
                
SendClientMessage(playerid, -1Dialog);
            }else{
            
                
Player[playerid][Iscas] += strval(inputtext);
                
SalvarDados(playerid);
                
format(Dialogsizeof(Dialog), "[Pescadores] Agora vocк tem %d iscas. -$%d"Player[playerid][Iscas], 30 strval(inputtext));
                
GivePlayerMoney(playerid30 * -strval(inputtext));
                
SendClientMessage(playerid, -1Dialog);
            }
        } 
Fiz assim , pra mim funcionou , vou testar com meu amigo , se nгo funcionar eu edito aqui.
Reply


Messages In This Thread
Iscas - by Cauezin - 09.05.2018, 23:04
Re: Iscas - by PT - 09.05.2018, 23:16
Re: Iscas - by Cauezin - 09.05.2018, 23:21
Re: Iscas - by FerrariL - 09.05.2018, 23:22
Re: Iscas - by Cauezin - 09.05.2018, 23:29
Re: Iscas - by FerrariL - 09.05.2018, 23:32
Re: Iscas - by Cauezin - 09.05.2018, 23:36
Re: Iscas - by FerrariL - 09.05.2018, 23:38
Re: Iscas - by Cauezin - 09.05.2018, 23:54

Forum Jump:


Users browsing this thread: 6 Guest(s)