SA-MP Forums Archive
[pedido] Sistema de caixinhas - 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: [pedido] Sistema de caixinhas (/showthread.php?tid=306936)



[pedido] Sistema de caixinhas - Alien_Halls - 28.12.2011

Tentei fazer mas deu 6 erros .. :/

fiz seguindo isso olha:
https://sampforum.blast.hk/showthread.php?tid=245659

mas deu 6 erros:

pawn Код:
C:\Documents and Settings\Christian temp\Desktop\Gamemods\BHL\gamemodes\BHL.pwn(2063) : error: 021: symbol already defined: "Caixinha"
C:\Documents and Settings\Christian temp\Desktop\Gamemods\BHL\gamemodes\BHL.pwn(2063) : error: 010: invalid function or declaration
C:\Documents and Settings\Christian temp\Desktop\Gamemods\BHL\gamemodes\BHL.pwn(2063) : error: 010: invalid function or declaration
C:\Documents and Settings\Christian temp\Desktop\Gamemods\BHL\gamemodes\BHL.pwn(2063) : error: 021: symbol already defined: "Caixinha"
C:\Documents and Settings\Christian temp\Desktop\Gamemods\BHL\gamemodes\BHL.pwn(2063) : error: 021: symbol already defined: "OnPlayerKeyStateChange"
C:\Documents and Settings\Christian temp\Desktop\Gamemods\BHL\gamemodes\BHL.pwn(2063) : warning: 209: function "OnPlayerKeyStateChange" should return a value



Re: [pedido] Sistema de caixinhas - Hardware - 28.12.2011

Apague todas variбveis "Caixinha" e deixe somente uma no topo do GameMode. Jб os outros, mande a linha.


Respuesta: [pedido] Sistema de caixinhas - Alien_Halls - 28.12.2011

/*ajuda samp - coloquei assim no gm olha */

//no topo do gm:
pawn Код:
static Caixinha[MAX_PLAYERS];
//num intendi isso aq embaixo muito bem :/

pawn Код:
public Payday  coloque Caixinha[i] ++;
OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
(
if(newkeys == KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 4.0, 1480.6571,-1638.2769,14.1484) && Caixinha[playerid] >= 1) {
        static PegarValor, PegarValor2, rString[87];
        Caixinha[playerid] = 0;
        GivePlayerMoney(playerid, PegarValor = random(4000));
        PlayerInfo[playerid][pExp] += PegarValor2 = random(5);
        format(rString, sizeof(rString), "(PRESENTE) Aew manolo vocк ganhou R$ %d e %d de Respeito de presente aproveita viado", PegarValor, PegarValor2);
        SendClientMessage(playerid, 0xAFAFAF66, rString);
        return true;
    }
    if(newkeys == KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 4.0, 1480.6571,-1638.2769,14.1484) && Caixinha[playerid] == 0)
        return SendClientMessage(playerid, 0xAFAFAF66, "(PRESENTE) Manolo vocк jб pegou a caixinha aguarde atй o PayDay");
hб e to com uma duvida tb!

isso aq vai em baixo do if certo ?
pawn Код:
OnPlayerKeyStateChange(playerid, newkeys, oldkeys)