SA-MP Forums Archive
[Ajuda] Loja de armas - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Loja de armas (/showthread.php?tid=596312)



Loja de armas - RafaelMau - 15.12.2015

Olб, estou tentando fazer um loja de armas mas algo estб saindo errado, jб tentei de vбrias formas mas nгo estб funcionando, alguйm se disponibiliza a me ajudar?
PHP код:
if(listitem == 0)
{
    new 
ComprarArma[13][2];
    for(new 
0<= 13i++)
    {
        
GetPlayerWeaponData(playeridiComprarArma[i][0], ComprarArma[i][1]);
        if(
ComprarArma[2][0] != 0)
        {
            
SendClientMessage(playeridCOR_VERMELHO"[ERRO]:"BRANCO" Vocк jб tem uma pistola!");
            return 
1;
        }
        else
        {
            if(
GetPlayerWeapon(playerid) == 22) return SendClientMessage(playeridCOR_VERMELHO"[ERRO]:"BRANCO" Vocк jб tem uma 9mm!");
            if(
CallRemoteFunction("VerGrana""i"playerid) < 3500) return SendClientMessage(playeridCOR_VERMELHO"[ERRO]:"BRANCO" Vocк nгo tem dinheiro o suficiente para comprar esta arma!");
            
CallRemoteFunction("Grana""ii"playerid, -3500);
            
GivePlayerWeapon(playerid22340);
            
SendClientMessage(playeridCOR_AMARELO"[INFO]:"BRANCO" Vocк comprou uma 9mm!");
        }
    }




Re: Loja de armas - BykiLler - 16.12.2015

if(GetPlayerWeapon(playerid) == 22) return SendClientMessage(playerid, COR_VERMELHO, "[ERRO]:"BRANCO" Vocк jб tem uma 9mm!");
if(CallRemoteFunction("VerGrana", "i", playerid) < 3500) return SendClientMessage(playerid, COR_VERMELHO, "[ERRO]:"BRANCO" Vocк nгo tem dinheiro o suficiente para comprar esta arma!");
CallRemoteFunction("Grana", "ii", playerid, -3500);
GivePlayerWeapon(playerid, 22, 340);
SendClientMessage(playerid, COR_AMARELO, "[INFO]:"BRANCO" Vocк comprou uma 9mm!");
}
}
}


Re: Loja de armas - RafaelMau - 16.12.2015

Quote:
Originally Posted by BykiLler
Посмотреть сообщение
if(GetPlayerWeapon(playerid) == 22) return SendClientMessage(playerid, COR_VERMELHO, "[ERRO]:"BRANCO" Vocк jб tem uma 9mm!");
if(CallRemoteFunction("VerGrana", "i", playerid) < 3500) return SendClientMessage(playerid, COR_VERMELHO, "[ERRO]:"BRANCO" Vocк nгo tem dinheiro o suficiente para comprar esta arma!");
CallRemoteFunction("Grana", "ii", playerid, -3500);
GivePlayerWeapon(playerid, 22, 340);
SendClientMessage(playerid, COR_AMARELO, "[INFO]:"BRANCO" Vocк comprou uma 9mm!");
}
}
}
Jб consegui resolver, mas obrigado...
Esse era o problema \/
PHP код:
for(new 0<= 13i++)//Errado
for(new 0<= 12i++)//Certo