dialog help
#5

PHP код:
        if(dialogid == 2009)
        {
            if(
response)
            {
                if (
PLAYERLIST_authed[playerid]) return SendClientMessage(playeridRed"You are already logged in.");

                if (
udb_Exists(PlayerName(playerid))) return SendClientMessage(playeridOrange"This name is already taken.");

                if (
udb_Create(PlayerName(playerid),inputtext))
                {
                    
dUserSetINT(PlayerName(playerid)).("Score"0);
                    
dUserSetINT(PlayerName(playerid)).("AdminLevel"0);
                    
dUserSetINT(PlayerName(playerid)).("PlayerLevel"0);
                    
dUserSetINT(PlayerName(playerid)).("Kills"0);
                    
dUserSetINT(PlayerName(playerid)).("Deaths"0);
                    return 
SendClientMessage(playeridRed"Your account has been created.");
                }
            }
            if(!
response)
            {
                
SendClientMessage(playerid,Red,"Canceled");
            }
            return 
1;
        }
        if(
dialogid == 2010)
        {
            if(
response)
            {
                if (
PLAYERLIST_authed[playerid]) return SendClientMessage(playeridOrange"You are already logged in");
                if (!
udb_Exists(PlayerName(playerid))) return SendClientMessage(playeridOrange"That account is not yet registerd.");
                if (
udb_CheckLogin(PlayerName(playerid), inputtext))
                    {
                        
SetPlayerScore(playeriddUserINT(PlayerName(playerid)).("Score")-GetPlayerScore(playerid));
                        
AdminLevel[playerid] = dUserINT(PlayerName(playerid)).("AdminLevel");
                        
PlayerLevel[playerid] = dUserINT(PlayerName(playerid)).("PlayerLevel");
                        
AdminLevel[playerid] = dUserINT(PlayerName(playerid)).("AdminLevel");
                        
Deaths[playerid] = dUserINT(PlayerName(playerid)).("Deaths");
                        
Kills[playerid] = dUserINT(PlayerName(playerid)).("Kills");
                        
PLAYERLIST_authed[playerid]=true;
                        
Logged[playerid] =1;
                        return 
SendClientMessage(playeridRed"You are now logged in.");
                     }
                return 
SendClientMessage(playeridRed"Login Failed.");
            }
            if(!
response)
            {
                
SendClientMessage(playerid,Red,"Canceled");
            }
            return 
1;
        } 
Reply


Messages In This Thread
dialog help - by marik1599 - 04.08.2011, 20:55
Re: dialog help - by =WoR=Varth - 05.08.2011, 00:46
Re: dialog help - by marik1599 - 05.08.2011, 14:33
Re: dialog help - by MadeMan - 05.08.2011, 14:44
Re: dialog help - by marik1599 - 05.08.2011, 14:49
Re: dialog help - by MadeMan - 05.08.2011, 14:54
Re: dialog help - by marik1599 - 05.08.2011, 15:03

Forum Jump:


Users browsing this thread: 1 Guest(s)