SA-MP Forums Archive
[Ajuda] Dialog nгo mostra - 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] Dialog nгo mostra (/showthread.php?tid=661359)



Dialog nгo mostra - BrGabrielBr - 01.12.2018

Bom, entгo estava fazendo sistema de login й registro, ai fiz tudo certinho ok atй ai compilei, sem erros й warnings sу que em in-game a dialog nгo aparece, alguйm pode me explicar oq fiz de errado?

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    new 
string[500];
    if(
DOF2_FileExists(PegarConta(playerid)))
    {
        
format(stringsizeof(string), "{FFFFFF}Seja bem-vindo novamente ao: {F5F6CE}Gangs Brasil {FFFFFF}- Oficial\n\n{FFFFFF}Status: {FFFF00}Registrado\n\n{FFFFFF}Nick Player: {FFFF00}%s\n\n{FFFFFF}Level: {FFFF00}%d\n\n{FFFFFF}Insira sua senha para efetuar o login."GetName(playerid), GetPlayerScore(playerid));
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT"{FFFFFF}Login {F5F6CE}Gangs Brasil:"string"{FFFFFF}Logar""{FFFFFF}Recuperar");
    }
    else
    {
        
format(stringsizeof(string), "{FFFFFF}Seja bem-vindo novamente ao: {F5F6CE}Gangs Brasil {FFFFFF}- Oficial\n\n{FFFFFF}Status: {DF0101}Nгo Registrado\n\n{FFFFFF}Nick Player: {FFFF00}%s\n\n{FFFFFF}Insira uma senha para se registrar no servidor."GetName(playerid));
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"{FFFFFF}Registro {F5F6CE}Gangs Brasil:"string"{FFFFFF}Registrar""{FFFFFF}Sair");
    }
    return 
true;




Re: Dialog nгo mostra - FerrariL - 01.12.2018

Faz um debug pra ver se estб acessando as condicionais.


Re: Dialog nгo mostra - BrGabrielBr - 01.12.2018

Quote:
Originally Posted by FerrariL
Посмотреть сообщение
Faz um debug pra ver se estб acessando as condicionais.
Um amigo meu que entende bastante de pawno nгo entendeu tambem, serб que й a public que estou colocando?


Re: Dialog nгo mostra - Malandrin - 01.12.2018

Coloque na public OnPlayerConnect. Teste e informe o resultado.


Re: Dialog nгo mostra - LucasF - 01.12.2018

Quote:
Originally Posted by BrGabrielBr
Посмотреть сообщение
Um amigo meu que entende bastante de pawno nгo entendeu tambem, serб que й a public que estou colocando?
coloque um print na callback e veja se irб printar:
PHP код:
print("1"); 



Re: Dialog nгo mostra - BrGabrielBr - 01.12.2018

Quote:
Originally Posted by Malandrin
Посмотреть сообщение
Coloque na public OnPlayerConnect. Teste e informe o resultado.
Coloquei й nгo foi, acho que possa ser o inicio do meu gamemode nй?

PHP код:
//~~> Includes
#include <a_samp>
#include <Pawn.CMD>
#include <DOF2>
#include <sscanf2>
//~~> Definiзхes
#define PASTA_CONTAS                                             "Contas/%s.ini"
//
#define TAG_ERRO                                               "[ERRO]:{FFFFFF}"
#define TAG_INFO                                               "[INFO]:{FFFFFF}"
#define TAG_AVISO                                             "[AVISO]:{FFFFFF}"
#define TAG_USOCORRETO                                  "[USO CORRETO]:{FFFFFF}"
#define TAG_SYSTEM                                            "<System>{FFFFFF}"
//
#define SCM \
SendClientMessage
//~~> Cores
#define COLOR_RED                                                     (0xDF0101FF)
#define COLOR_WHITE                                                 (0xFFFFFFFF)
#define COLOR_GREY                                                  (0xA4A4A4FF)
#define COLOR_BLUE                                                  (0x0040FFFF)
#define COLOR_BLUELEVE                                              (0x58D3F7AA)
#define COLOR_YELLOW                                                (0xF7FE2EFF)
#define COLOR_PRINCIPAL                                             (0xF5F6CEAA)
#define COLOR_GREEN                                                 (0x04B431FF)
//~~> Dialogs
#define DIALOG_REGISTER                                                      (1)
#define DIALOG_LOGIN                                                         (2) 



Re: Dialog nгo mostra - LucasF - 01.12.2018

Quote:
Originally Posted by BrGabrielBr
Посмотреть сообщение
Coloquei й nгo foi, acho que possa ser o inicio do meu gamemode nй?

PHP код:
//~~> Includes
#include <a_samp>
#include <Pawn.CMD>
#include <DOF2>
#include <sscanf2>
//~~> Definiзхes
#define PASTA_CONTAS                                             "Contas/%s.ini"
//
#define TAG_ERRO                                               "[ERRO]:{FFFFFF}"
#define TAG_INFO                                               "[INFO]:{FFFFFF}"
#define TAG_AVISO                                             "[AVISO]:{FFFFFF}"
#define TAG_USOCORRETO                                  "[USO CORRETO]:{FFFFFF}"
#define TAG_SYSTEM                                            "<System>{FFFFFF}"
//
#define SCM \
SendClientMessage
//~~> Cores
#define COLOR_RED                                                     (0xDF0101FF)
#define COLOR_WHITE                                                 (0xFFFFFFFF)
#define COLOR_GREY                                                  (0xA4A4A4FF)
#define COLOR_BLUE                                                  (0x0040FFFF)
#define COLOR_BLUELEVE                                              (0x58D3F7AA)
#define COLOR_YELLOW                                                (0xF7FE2EFF)
#define COLOR_PRINCIPAL                                             (0xF5F6CEAA)
#define COLOR_GREEN                                                 (0x04B431FF)
//~~> Dialogs
#define DIALOG_REGISTER                                                      (1)
#define DIALOG_LOGIN                                                         (2) 
Colocou na OnPlayerRequestClass ou na OnPlayerConnect? Se nao printar em nenhuma das 2 vocк terб de analisar seu cуdigo denovo, pode ser erro em alguma condicional.


Re: Dialog nгo mostra - Domingues - 02.12.2018

Estou achando que o plugin steamer nгo foi carregado e estб dando Run time error 19: "File or function is not found"