HELP WITH DIALOG BOX
#1

HI guyz..
I need your help. so how to a login dialog box. and it also show player spawn..
PHP код:
    {
            
cmd_register(playerid,inputtext);
            if (
PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: You are already registered and logged in.");
            if (
udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: This account already exists, please use '/login [password]'.");
            if (
strlen(inputtext) < || strlen(inputtext) > 20) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Password length must be greater than three characters");
            if (
udb_Create(PlayerName2(playerid),inputtext))
            {
                new 
file[256],rname[MAX_PLAYER_NAME], tmp3[100];
                new 
strdate[20], year,month,day;
                
getdate(yearmonthday);
                
GetPlayerName(playerid,rname,sizeof(rname));
                
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(rname));
                 
GetPlayerIp(playerid,tmp3,100);
                
dini_Set(file,"ip",tmp3);
        
//        dini_Set(file,"password",params);
                
dUserSetINT(PlayerName2(playerid)).("registered",1);
                   
format(strdatesizeof(strdate), "%d/%d/%d",day,month,year);
                
dini_Set(file,"RegisteredDate",strdate);
                
dUserSetINT(PlayerName2(playerid)).("loggedin",1);
                
dUserSetINT(PlayerName2(playerid)).("banned",0);
                
dUserSetINT(PlayerName2(playerid)).("level",0);
                
dUserSetINT(PlayerName2(playerid)).("LastOn",0);
                
dUserSetINT(PlayerName2(playerid)).("money",0);
                
dUserSetINT(PlayerName2(playerid)).("kills",0);
                   
dUserSetINT(PlayerName2(playerid)).("deaths",0);
                
PlayerInfo[playerid][LoggedIn] = 1;
                
PlayerInfo[playerid][Registered] = 1;
                
SendClientMessage(playeridgreen"ACCOUNT: You are now registered, and have been automaticaly logged in");
                
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
                return 
1;
            }
        } 
Reply


Messages In This Thread
HELP WITH DIALOG BOX - by RocketBoy - 21.08.2015, 21:51
Re: HELP WITH DIALOG BOX - by brandypol - 21.08.2015, 22:11
Re: HELP WITH DIALOG BOX - by RocketBoy - 22.08.2015, 04:11

Forum Jump:


Users browsing this thread: 2 Guest(s)