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



OnPlayerEnterCheckpoint - Lucas_HenryK - 16.02.2014

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    // [ LOJA DE ARMAS 1 ] :
    if(CPS_GetPlayerCheckpoint(playerid == CheckLojaArmas))
    {
        Ammunation(playerid);
        return 1;
    }
   
    // [ LOJA DE COMIDAS 1 ] :
    if(CPS_GetPlayerCheckpoint(playerid == CheckLojaComidas))
    {
        Comidas(playerid);
        return 1;
    }
    return 1;
}

O problema й que estб acontecendo bugs, exemplo:

Se eu entro no checkpont ' CheckLojaComidas ' ao inves de executar a funзгo ' Comidas(playerid); ' executa ' Ammunation(playerid); ' , acontece tipo.. randomicamente, as vezes й com o ' CheckLojaArmas ' e executa ' Comidas(playerid); '.


Re: OnPlayerEnterCheckpoint - PT - 16.02.2014

ja viu se as cordenadas dos mesmos nao tao trocadas?


Re: OnPlayerEnterCheckpoint - Kmatsu - 16.02.2014

Troque
pawn Код:
if(CPS_GetPlayerCheckpoint(playerid == CheckLojaArmas))
e
if(CPS_GetPlayerCheckpoint(playerid == CheckLojaArmas))
para
pawn Код:
if(CPS_GetPlayerCheckpoint(playerid) == CheckLojaArmas)
e
if(CPS_GetPlayerCheckpoint(playerid) == CheckLojaComidas)