[Ajuda]
#1

Bom o erro й o seguinte o a aзгo 1 estб iniciando sem ter necessidade, era pra iniciar caso a organizaзгo tivesse 1 materiais ou menos mais isso estб se executando sem os requerimentos que coloquei, alguйm sabe o que й? Obrigado.
Cуdigo:
pawn Код:
if(listitem == 0)
    {
    GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
    new organizacao = GetPlayerOrg(playerid);
    if(Cofre[organizacao][Materiais] < 1) // Aзгo: 1
    {
    PlayerInfo[playerid][pMaterial] = 0;
    return 1;
    }
    if(Cofre[organizacao][Maconha] < 1) // Aзгo: 2
    {
    PlayerInfo[playerid][pMaconha] = 0;
    return 1;
    }
    if(Cofre[organizacao][Maconha] > 2 || (Cofre[organizacao][Materiais] > 2) // Aзгo: 3
    {
    PlayerInfo[playerid][pMaterial] -= 500;
    Cofre[organizacao][Materiais] +500;
    PlayerInfo[playerid][pMaconha] -= 500;
    Cofre[organizacao][Maconha] +500;
    SendClientMessage(playerid, COLOR_GREY,"Vocк perdeu 500 materiais/maconha por depositar no seu cofre!");
    return 1;
    }
    }
Reply
#2

Jб tentou um return 0; ? .-.
Reply
#3

Sim.
Reply
#4

pawn Код:
if(listitem == 0)
    {
    if(Cofre[organizacao][Materiais] < 1) return SendClientMessage(playerid, cor, "Vocк n tem Materiais!111 onze");
    if(Cofre[organizacao][Maconha] < 1) return SendClientMessage(playerid, cor, "Vocк n tem Maconha!111 onze");    
    GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
    new organizacao = GetPlayerOrg(playerid);
    if(Cofre[organizacao][Maconha] > 2 || (Cofre[organizacao][Materiais] > 2) // Aзгo: 3
    {
    PlayerInfo[playerid][pMaterial] -= 500;
    Cofre[organizacao][Materiais] +500;
    PlayerInfo[playerid][pMaconha] -= 500;
    Cofre[organizacao][Maconha] +500;
    SendClientMessage(playerid, COLOR_GREY,"Vocк perdeu 500 materiais/maconha por depositar no seu cofre!");
    return 1;
    }
    }
Jб tentou assim? huaehueaea
Reply
#5

Bom o que eu quero й assim quando na organizaзгo nгo tiver X maconha/materiais o materiais/maconha й resetado sabe...
Sу que ele reseta mesmo tendo material.
Reply
#6

pawn Код:
if(Cofre[organizacao][Materiais] < 1) // Aзгo: 1
    PlayerInfo[playerid][pMaterial] = 0;
Qual a finalidade disso? Se ele й jб й menor que um (0 ou menos), pra que setar pra 0 ?
Reply
#7

Assim ele irб setar pra 0 caso tiver menos de 1 entende na organizaзгo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)