Gamemode Registration Issue.
#1

My gamemode is not working, the account registration does not work correctly as all the accounts are saved empty .ini files. How can I fix this? Here is the problem;

case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Server Account",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
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,"Helper",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"PlayerLogged",0);
INI_WriteInt(File,"Muted",0);
INI_WriteInt(File,"Kicks",0);
INI_WriteInt(File,"Jails",0);
INI_WriteInt(File,"Warnings",0);
INI_WriteInt(File,"Jailed",0);
INI_WriteInt(File,"AHide",0);
INI_WriteInt(File,"AdminDuty",0);
INI_WriteInt(File,"HelperDuty",0);
INI_WriteInt(File,"Reported",0);
INI_WriteInt(File,"Weapons",0);
INI_WriteInt(File,"Spectate",0);
INI_WriteInt(File,"Registered",0);
INI_WriteInt(File,"Model",0);
INI_WriteInt(File,"Member",0);
INI_WriteInt(File,"AdmName", 0);
INI_WriteInt(File,"HelName", 0);
INI_WriteInt(File,"SkinUsed", 0);
INI_WriteInt(File,"Kills", 0);
INI_WriteInt(File,"HelpMe", 0);
INI_WriteInt(File,"DesertEagleKills", 0);
INI_WriteInt(File,"MarkX", 0);
INI_WriteInt(File,"MarkY", 0);
INI_WriteInt(File,"MarkZ", 0);
INI_WriteInt(File,"Donator", 0);
INI_WriteInt(File,"FightStyle", 0);
INI_Close(File);

SendClientMessage(playerid, COLOR_LIGHTRED, "INFO: Account coverted, you are required to relog");
Kick(playerid);
}
}
Reply
#2

-Nevermind, read the post wrong-
Reply
#3

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
-Nevermind, read the post wrong-
Spoke to you on MSN, but neither of the things you said worked.
Reply
#4

Show me UserPath(playerid).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)