[URGENT] Players becoming Admins & VIPs!
#6

here is the code Fixed
PHP код:
if (dialogid == REGISTER)
    {
        if (!
response) return Kick(playerid);
        if (
response)
        {
            if (!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridREGISTERDIALOG_STYLE_PASSWORD""TELEPORTBLUE">> Account Register"""WHITE"Please enter a password below to register.""Register""Quit");
                return 
1;
            }
            new 
hashpass[129], date[20], yearmonthdaystr[200];
            new    
random_color = ( 16777216 random256 ) ) + ( 65536 random256 ) ) + ( 256 random256 ) ) + 255;
            
WP_Hash(hashpasssizeof(hashpass), inputtext);
            
getdate(yearmonthday);
            
format(datesizeof(date), "%d/%d/%d"daymonthyear);
            new 
INI:File INI_Open(UserPath(playerid));
            
INI_SetTag(File"Player's Data");
            
INI_WriteString(File"Password"hashpass);
            
INI_WriteString(File"Registered_On"date);
            
INI_WriteInt(File,"Admin"0);
            
INI_WriteInt(File,"VIP"0);
            
INI_WriteInt(File,"Cash"0);
            
INI_WriteInt(File,"Score"0);
            
INI_WriteInt(File,"Kills"0);
            
INI_WriteInt(File,"Deaths"0);
            
INI_WriteInt(File"Hours"0);
            
INI_WriteInt(File"Minutes"0);
            
INI_Close(File);
            
gTotalRegisters++;
            
GivePlayerMoney(playerid5000);
            
PlayerInfo[playerid][Hours] = 0;
            
PlayerInfo[playerid][Minutes] = 0;
           
PlayerInfo[playerid][Admin]=0;
          
PlayerInfo[playerid][VIP]=0;
        
PlayerInfo[playerid][Kills]=0;
          
PlayerInfo[playerid]Deaths]=0;
            
SendClientMessage(playeridCOLOR_PINK"- RegServ - Your account has been successfully registered.");
            
SpawnPlayer(playerid);
            
format(strsizeof(str), "- RegServ - {%06x}%s(%d) {2BD9F8}has registered, making the server have total {008FFB}%d {2BD9F8}players registered."random_color >>> 8GetName(playerid), playeridgTotalRegisters);
            
SetPlayerColor(playeridrandom_color);
            
SendClientMessageToAll(0x2BD9F8FFstr);
            new 
INI:FILE_SERVER_STATS INI_Open(ServerStats);
            
INI_SetTag(FILE_SERVER_STATS"Server_Statistics");
            
INI_WriteInt(FILE_SERVER_STATS"Total_Registered_Users"gTotalRegisters);
            
INI_Close(FILE_SERVER_STATS);
            
PlayerInfo[playerid][Spawned] = 1;
            
PlayerInfo[playerid][LoggedIn] = 1;
            return 
1;
        }
    } 
Reply


Messages In This Thread
[URGENT] Players becoming Admins & VIPs! - by SyntaxQ - 29.03.2014, 12:20
Re: [URGENT] Players becoming Admins & VIPs! - by Vince - 29.03.2014, 12:21
Re: [URGENT] Players becoming Admins & VIPs! - by SyntaxQ - 29.03.2014, 12:26
Re: [URGENT] Players becoming Admins & VIPs! - by DarkLored - 29.03.2014, 12:32
Re: [URGENT] Players becoming Admins & VIPs! - by EiresJason - 29.03.2014, 12:33
Re: [URGENT] Players becoming Admins & VIPs! - by MBilal - 29.03.2014, 12:38
Re: [URGENT] Players becoming Admins & VIPs! - by SyntaxQ - 29.03.2014, 12:51

Forum Jump:


Users browsing this thread: 1 Guest(s)