Problem Reason save Date
#10

Ok,
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Enregistrement",""COL_RED"Vous avez entrй un mot de passe invalide\n"COL_WHITE"Entrer un mot de passe afin de vous enregistrer.","S'enregistrer","Quitter");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Cash",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_WriteInt(File,"Score",0);
                
INI_WriteInt(File,"Ban",0);
                
INI_Close(File);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Vous avez crйez un compte avec succиs bienvenue sur le serveur!","Ok","");
            }
        }
        case 
DIALOG_LOGIN:
        {
            if ( !
response //return Kick ( playerid );
            
{
            new 
Joueur[MAX_PLAYER_NAME];
            new 
string[128];
            
GetPlayerName(playerid,Joueur,sizeof(Joueur));
            
format(string,sizeof(string),"Le joueur %s a йtй automatiquement kickй Raison : refusй de se loguer.",Joueur);
            
SendClientMessageToAll(0x8395BEFF,string);
            
SetTimerEx("loguer",1000,false,"playerid",playerid);
            }
            if( 
response )
            {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    if(
PlayerInfo[playerid][pBan] == 1)
                    {
                    
SendClientMessage(playerid,-1,"Banni");
                    
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Banni","Banni","ok","ok");
                    
SetTimerEx("compte",1000,false,"playerid",playerid);
                    }
                    if(
PlayerInfo[playerid][pBan] == 0)
                    {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                    
SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Vous vous кtes correctement connectй!","Ok","");
                }
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Connection",""COL_RED"Vous avez entrй un mot de passe invalide.\n"COL_WHITE"Veuillez entrer votre mot de passe pour vous connecter.","Connexion","Quitter");
                }
                return 
1;
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Problem Reason save Date - by Xprototype - 25.10.2013, 19:45
Re : Problem Reason save Date - by Xprototype - 25.10.2013, 20:05
Re : Problem Reason save Date - by Xprototype - 25.10.2013, 20:43
Re: Problem Reason save Date - by SilentSoul - 25.10.2013, 20:58
Re : Problem Reason save Date - by Xprototype - 25.10.2013, 21:00
Re: Problem Reason save Date - by SilentSoul - 25.10.2013, 21:12
Re : Problem Reason save Date - by Xprototype - 25.10.2013, 21:26
Re : Problem Reason save Date - by Xprototype - 25.10.2013, 21:33
Re: Problem Reason save Date - by SilentSoul - 25.10.2013, 21:36
Re : Problem Reason save Date - by Xprototype - 25.10.2013, 21:40

Forum Jump:


Users browsing this thread: 4 Guest(s)