[Ajuda] Loja de armas
#1

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 
i = 0; i <= 13; i++)
    {
        
GetPlayerWeaponData(playerid, i, ComprarArma[i][0], ComprarArma[i][1]);
        if(
ComprarArma[2][0] != 0)
        {
            
SendClientMessage(playerid, COR_VERMELHO, "[ERRO]:"BRANCO" Vocк jб tem uma pistola!");
            return 
1;
        }
        else
        {
            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!");
        }
    }
} 
Reply
#2

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!");
}
}
}
Reply
#3

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 i = 0; i <= 13; i++)//Errado
for(new i = 0; i <= 12; i++)//Certo 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)