11.07.2015, 18:17
Hi, I'm trying to save a players IP when they register but it's not creating in the players INI file.
Here's my code under the registration dialog
Here's the ini file after registration
Here's my code under the registration dialog
Код:
new plrIP[16]; GetPlayerIp(playerid, plrIP, sizeof(plrIP)); new Year,Month,Day,DATEJOINED[15]; getdate(Year,Month,Day); format(DATEJOINED, sizeof(DATEJOINED), "%i.%i.%i",Day, Month, Year); if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{6DD7E3}Registration","{FF0000}You have entered an invalid password.\n{FFFFFF}Type your password below to register a new account.\n{FFE733}This is NOT blurred out.","Register","Quit"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"AdminLevel",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Credits",50); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"VipLevel",0); INI_WriteString(File,"Registration IP",plrIP); INI_WriteString(File,"Date Joined", DATEJOINED); INI_Close(File);