20.12.2014, 18:50
Well... for some stupid reason, Accounts save when they feel like it.... Sometimes they will randomly save, sometimes not... not sure what is going on....
Код:
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COL_WHITE"San Andreas Border Partrol",""COL_RED"Incorrect Password, please try again.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
if(20 < strlen(inputtext) || strlen(inputtext) < 4 ) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COL_WHITE"San Andreas Border Partrol",""COL_RED"Please choose a password between 4 and 20 characters.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Player Data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"CitySpawn",0);
INI_WriteInt(File,"SpawnInHouse",0);
INI_WriteInt(File,"Seconds",0);
INI_WriteInt(File,"Minutes",0);
INI_WriteInt(File,"Hours",0);
INI_WriteInt(File,"Money",10000);
INI_WriteInt(File,"BankCash",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Grams",0);
INI_WriteInt(File,"Seeds",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Warnings",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"Team",0);
INI_WriteInt(File,"TruckMCompleted",0);
INI_WriteInt(File,"Wanted_Level",0);
INI_WriteInt(File,"WeaponSlot1",0);
INI_WriteInt(File,"WeaponSlot1_Ammo",0);
INI_WriteInt(File,"WeaponSlot2",0);
INI_WriteInt(File,"WeaponSlot2_Ammo",0);
INI_WriteInt(File,"WeaponSlot3",0);
INI_WriteInt(File,"WeaponSlot3_Ammo",0);
INI_WriteInt(File,"WeaponSlot4",28);
INI_WriteInt(File,"WeaponSlot4_Ammo",1000);
INI_WriteInt(File,"WeaponSlot5",0);
INI_WriteInt(File,"WeaponSlot5_Ammo",0);
INI_WriteInt(File,"WeaponSlot6",0);
INI_WriteInt(File,"WeaponSlot6_Ammo",0);
INI_Close(File);
Info[playerid][Logged] = true;
TogglePlayerSpectating(playerid,0);
SendClientMessage(playerid, COLOR_GREEN, "You have successfully registered. You can now choose your team.");
SetTimerEx("GameTimeStats",1000,1,"i",playerid);
}
}


