[AJUDA] Problemas no Checkpoint
#1

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.
Reply
#2

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

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;
}
Reply
#4

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.
Reply
#5

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 '-'
Reply
#6

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
Reply
#7

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;
}
Reply
#8

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 :/
Reply
#9

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/
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)