SA-MP Forums Archive
[AJUDA] Problemas no Checkpoint - 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] Problemas no Checkpoint (/showthread.php?tid=311258)



[AJUDA] Problemas no Checkpoint - cezaro - 15.01.2012

Iae galera, to com um probleminha aqui, eu criei os chechpoints normal mas quando eu passo em cima nao aparece a mensagem.

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new Check = CPS_GetPlayerCheckpoint(playerid);
    if(Check == menuagencia)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        return 1;
    }
    if(Check == menuhabilitacao)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    return 1;
}
Desde ja Obrigado.


Re: [AJUDA] Problemas no Checkpoint - Dolby - 15.01.2012

vocк armazenou os valores destes Checkpoints nas variaveis Menuhabilitacao e menuagencia ?


Re: [AJUDA] Problemas no Checkpoint - cezaro - 15.01.2012

Quote:
Originally Posted by Gustavo_Araujo
Посмотреть сообщение
vocк armazenou os valores destes Checkpoints nas variaveis Menuhabilitacao e menuagencia ?
pawn Код:
new menuhabilitacao;
new menuagencia;
pawn Код:
menuhabilitacao = CPS_AddCheckpoint(-2032.5609,-117.3783,1035.1719, 1.0, 30);
menuagencia = CPS_AddCheckpoint(1491.8577,1306.2950,1093.2964, 1.5, 30);
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new Check = CPS_GetPlayerCheckpoint(playerid);
    if(Check == menuagencia)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        return 1;
    }
    if(Check == menuhabilitacao)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    return 1;
}



Re: [AJUDA] Problemas no Checkpoint - Dolby - 15.01.2012

O codigo parece estar certo,tente fazer uns testes,como criar um novo Checkpoint e fazer o mesmo processo com ele,so que com um print,e veja o que acontece,o problema pode estar na include.


Re: [AJUDA] Problemas no Checkpoint - dPlaYer_ - 15.01.2012

Tente isto: '-'
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CPS_IsPlayerInCheckpoint(playerid, menuagencia))
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    if(CPS_IsPlayerInCheckpoint(playerid, menuhabilitacao))
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    return 1;
}
ou Entao se preferir este:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new Check = CPS_GetPlayerCheckpoint(playerid);
    if(Check == menuagencia)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    if(Check == menuhabilitacao)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    return 1;
}
Testei e funcionou,
sу deu estes erros pq nao ta definida no meu gm de testes *-*

Pode usar qualquer 1 dos q ta entre o [pawn] [ / pawn ]
ambos sao a mesma coisa '-'


Re: [AJUDA] Problemas no Checkpoint - cezaro - 15.01.2012

Quote:
Originally Posted by [LF]PlaYer
Посмотреть сообщение
Tente isto: '-'
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CPS_IsPlayerInCheckpoint(playerid, menuagencia))
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    if(CPS_IsPlayerInCheckpoint(playerid, menuhabilitacao))
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    return 1;
}
ou Entao se preferir este:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new Check = CPS_GetPlayerCheckpoint(playerid);
    if(Check == menuagencia)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    if(Check == menuhabilitacao)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    return 1;
}
Testei e funcionou,
sу deu estes erros pq nao ta definida no meu gm de testes *-*

Pode usar qualquer 1 dos q ta entre o [pawn] [ / pawn ]
ambos sao a mesma coisa '-'
Nгo funcionou tembem, O estranho й que ta aparecendo os checkpoint so nao ta aparecendo as mensagens quando vo em cima


Re: [AJUDA] Problemas no Checkpoint - dPlaYer_ - 15.01.2012

Vou testar aqui no meu sv ._.' pera z.z
@Edit
tenta
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CPS_IsPlayerInCheckpoint(playerid, menuagencia))
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        return 1;
    }
    if(CPS_IsPlayerInCheckpoint(playerid, menuhabilitacao))
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        return 1;
}
    return 1;
}



Re: [AJUDA] Problemas no Checkpoint - AleeFerreira - 15.01.2012

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new Check = CPS_GetPlayerCheckpoint(playerid);
    if(Check == menuagencia)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu de profissoes, Digite: /profs");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Agкncia de Empregos ~~~~~~~~~~~~~~~~~~~~~~~~~");
        return 1;
    }
    if(Check == menuhabilitacao)
    {
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, -1, "Para ver o menu use: /habilitacoes");
        SendClientMessage(playerid, 0x008080AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Habilitaзгo ~~~~~~~~~~~~~~~~~~~~~~~~~");
        return 1;
    }
    return 1;
}
Quando isso acontece comigo eu returno 1 em cada um deles e pega, mais й mt dificil de acontecer isso cmg tambйm :/


Re: [AJUDA] Problemas no Checkpoint - dPlaYer_ - 15.01.2012

Aqui pegou normal '-' pera vo mandar print z.z tanto faz usar o meu code ou do alee


http://imageshack.us/f/560/asascb.png/


Re: [AJUDA] Problemas no Checkpoint - cezaro - 15.01.2012

Baa galera nгo funcionou tambem, so aparece o checkpoint mas a mensagem nгo, deve ser problema da include cpstream?