SA-MP Forums Archive
[Ajuda]Cofre 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]Cofre Armas (/showthread.php?tid=205282)



[Ajuda]Cofre Armas - jonas_gabriel - 01.01.2011

Pessoal to fazendo um sistema de depositar armas no cofre da hq das orgs entгo to com um problema se eu continuar depositando a Eagle que seria a arma mesmo nгo tendo ela vai depositando balas igual presiso de ajuda :S.

pawn Код:
if(dialogid == 6968)
    {
        if(response >= 1)
        {
            new org = GetPlayerOrg(playerid);
            new depEagle = strval(inputtext);
            new pEagle = PlayerInfo[playerid][pGun2] = 24;
            if(pEagle < depEagle)
            {
                SendClientMessage(playerid,COLOR_GRAD1,"Vocк nгo tem uma eagle ou a quantia de balas!");
                return 1;
            }
            if(depEagle > 0)
            {
                if(pEagle >= depEagle)
                {
                    GivePlayerWeapon(playerid, 24, -depEagle);
                    DepositarEagle(org,depEagle);
                    format(string,sizeof(string),"Vocк Depositou %d balas de eagle,Nova quantia de balas no cofre й %d",depEagle,BancoDasOrgs[org][Eagle]);
                    SendClientMessage(playerid,COLOR_GRAD1,string);
                    return 1;
                }
            }
            return 1;
        }
        return 1;
    }



Re: [Ajuda]Cofre Armas - vinewood - 01.01.2011

Acho que й isso q falta...
pawn Код:
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
    GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
if(weapons[2][0] == 24 && weapons[2][1] >= depEagle)



Re: [Ajuda]Cofre Armas - jonas_gabriel - 01.01.2011

estб correto assim ? porque nгo estб dando certo.
pawn Код:
if(dialogid == 6968)
    {
        if(response >= 1)
        {
            new org = GetPlayerOrg(playerid);
            new depEagle = strval(inputtext);
            new pEagle = PlayerInfo[playerid][pGun2] = 24;
            new weapons[13][2];
            for (new i = 0; i < 13; i++)
            {
            GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
            }
            if(weapons[2][0] == 24 && weapons[2][1] >= depEagle)
            {
                SendClientMessage(playerid,COLOR_GRAD1,"Vocк nгo tem uma eagle ou a quantia de balas!");
                return 1;
            }
            if(depEagle > 0)
            {
                if(pEagle >= depEagle)
                {
                    GivePlayerWeapon(playerid, 24, -depEagle);
                    DepositarEagle(org,depEagle);
                    format(string,sizeof(string),"Vocк Depositou %d balas de eagle,Nova quantia de balas no cofre й %d",depEagle,BancoDasOrgs[org][Eagle]);
                    SendClientMessage(playerid,COLOR_GRAD1,string);
                    return 1;
                }
            }
            return 1;
        }
        return 1;
    }



AW: [Ajuda]Cofre Armas - [Banido]HigorOliver - 01.01.2011

usa como base : https://sampforum.blast.hk/showthread.php?tid=204535


Re: AW: [Ajuda]Cofre Armas - jonas_gabriel - 01.01.2011

Quote:
Originally Posted by [Banido]HigorOliver
Посмотреть сообщение
vlw pela ajuda mais nгo й bem do geito que eu quero


Re: [Ajuda]Cofre Armas - bugvip - 01.01.2011

usa como base

ele se refiriu pra vse usar como base, ou seja, adaptar isso ao seu game mode.... ele te deu tudo o que presisa, agora й so fazer