07.06.2015, 04:28
But can you fix the warning(already stated below)..i try to fix the warning with your guide but it still persist..
line 118
line 122
whole code
line 118
Код:
return 1;
Код:
return 1;
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch( dialogid ) { case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(inputtext[0] == 0 || (inputtext[0] == 1 && inputtext[1] == 0)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit"); new hashpass[129]; WP_Hash(hashpass,sizeof(hashpass),inputtext); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteString(File,"Password",hashpass); INI_WriteInt(File,"Cash",0); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"Vip",0); INI_Close(File); new string[256], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format( string, sizeof(string), "Welcome To {CCFF33}Cyber {66CCFF}Malaysian {FFCC99}Army, {FF6600}%s{FFFFFF}", pname); SendClientMessage(playerid, 0xFFFFFFFF, string); SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); } } case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { new hashpass[129]; WP_Hash(hashpass,sizeof(hashpass),inputtext); if(!strcmp(hashpass, PlayerInfo[playerid][pPass], false)) { new string[256], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"Success!","You have successfully logged in!","Ok",""); format( string, sizeof(string), "Welcome Back, {FF6600}%s{FFFFFF}", pname); SendClientMessage(playerid, 0xFFFFFFFF, string); SendClientMessageToAll( -1, szStr); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit"); } return 1; } } } return 1; }