Dialog problem - Rep+
#3

Код:
#define DIALOG_PRAVILA 54 // id is 54 change and..
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD""COL_WHITE"Registracija",""COL_WHITE"Poљtovani,upisali ste nedozvoljivu lozinku.\n"COL_WHITE"Upiљite vasu lozinku kako biste se registrirali na server.\nVazno je znati da"COL_LIGHTBLUE" WG zajednica"COL_WHITE" nece nikad odat vasu lozinku.\nAko imate dodatnih problema kontaktirajte nas na webu!","Registracija","Izlaz");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Score",0);
                
INI_WriteInt(File,"Novac",0);
                
INI_WriteInt(File,"Administrator",0);
                
INI_WriteInt(File,"Viplevel",0);
                
INI_WriteInt(File,"Banka",0);
                
INI_WriteInt(File,"Banovan",0);
                
INI_WriteInt(File,"Ubojstva",0);
                
INI_WriteInt(File,"Smrti",0);
                
INI_Close(File);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Uspjesna registracija",""COL_WHITE"Poљtovani,uspjeљno ste registrirali novi account.\nZa vaљu sigurnost preporucavamo vam da odradite 'relog' kako bismo spremili podatke.\nUzivajte igrajuci na nasem serveru!","Uredu","");
            }
        }
        case 
DIALOG_LOGIN:
        {
            if(!
response) return Kick(playerid);
            if(
response)
            {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPassword])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pNovac]);
                    
SetPlayerScore(playeridPlayerInfo[playerid][pScore]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX,""COL_WHITE"Uspjesno logiranje",""COL_WHITE"Poљtovani,uspjeљno ste se ulogirali na vas account.\nNastavite sa igrom tamo gdje ste stali.\nUzivanje na nasem serveru zeli vam"COL_LIGHTBLUE" WG Administracija.\n\n"COL_WHITE"Ako imate dodatnih problema u vezi accounta kontaktirajte nas na webu!\n"COL_ORANGEwww.WilderGaming.net","Uredu","");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Logiranje",""COL_WHITE"Poљtovani,upisali ste pogreљnu lozinku.\n"COL_WHITE"Molimo vas da pazljivo unesete tocnu lozinku.\nImate"COL_LIGHTBLUE" 30 sekundi"COL_WHITE" da unesete lozinku uprotivnom cete biti kikovani sa servera.","Login","Izlaz");
                }
            }
        }
        case 
DIALOG_PRAVILA//verify if our dialog id is = with dialog created and if exist
        
{
            if(
response// press the Accept button
            
{
                 
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Procitali ste osnovna RP pravila.");
            }
        }
    }
    return 
true;

Reply


Messages In This Thread
Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 10:49
Re: Dialog problem - Rep+ - by CalvinC - 05.03.2015, 11:09
Respuesta: Dialog problem - Rep+ - by JuanStone - 05.03.2015, 11:22
Re: Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 11:30
Re: Dialog problem - Rep+ - by Wolfey20 - 05.03.2015, 11:38
Re: Dialog problem - Rep+ - by J0sh... - 05.03.2015, 11:40
Re: Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 11:42
Respuesta: Dialog problem - Rep+ - by JuanStone - 05.03.2015, 11:44
Re: Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 11:48
Re: Dialog problem - Rep+ - by J0sh... - 05.03.2015, 11:50

Forum Jump:


Users browsing this thread: 1 Guest(s)