10.03.2012, 16:30
Код:
switch( dialogid ) { case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { switch(listitem)// Checking which listitem was selected { case 0: { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""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,"Registred",1); INI_WriteInt(File,"Cash",0); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"Respect",0); INI_WriteInt(File,"House",0); INI_WriteInt(File,"Car",0); INI_WriteInt(File,"Gun",0); INI_WriteInt(File,"Gun1",0); INI_WriteInt(File,"Gun2",0); INI_WriteInt(File,"Gun3",0); INI_WriteInt(File,"Materials",0); INI_WriteInt(File,"Bullets",0); INI_WriteInt(File,"Gangid",0); INI_WriteInt(File,"Jailed",0); INI_WriteInt(File,"Race",0); INI_WriteInt(File,"Cashbox",0); INI_WriteInt(File,"Minimission",0); INI_WriteInt(File,"Event",0); INI_WriteInt(File,"Quiz",0); INI_WriteInt(File,"FightingStyle",0); INI_Close(File); } case 1: { ShowPlayerDialog(playerid,DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Stats have been saved!","Ok",""); } case 2: { ShowPlayerDialog(playerid,DIALOG_QUIZ,DIALOG_STYLE_LIST,"What does RP stands for?"," Real Pussy \n Role Play \n Real Money","Select","Leave Game"); } case 3: { ShowPlayerDialog(playerid,DIALOG_Figting,DIALOG_STYLE_LIST,"Choose Your Fighting Style"," Elbow \n Boxing \n Grab kick \n Kung Fu \n Normal","Accept","Cancel"); } case 4: { ShowPlayerDialog(playerid,DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! YourStats have been saved!","Ok",""); } case 5: { QuizAnswers[playerid] = 0; // We set the player quiz answers to 0 when he connects. SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); } } } }
Can help me out...