21.06.2016, 15:56
Great. That works.
My other problem is that some separate scripts in the OnDialogResponse mix up.
For example: I have a VIP Weapon dialog menu, and when I choose a weapon it shows a dialog with "You have entered an incorrect password".
My other problem is that some separate scripts in the OnDialogResponse mix up.
For example: I have a VIP Weapon dialog menu, and when I choose a weapon it shows a dialog with "You have entered an incorrect password".
Код:
case DIALOG_LOGIN: { if ( !response ) { Kick(playerid); SCM(pid, COLOR_BISQUE, "You have been kicked because you didn't register!"); } if( response ) { if(udb_hash(inputtext) == Player[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, Player[playerid][pCash]); ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"{FFFFFF}Success!","{FFFFFF}You have successfully logged in!","Ok", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{1AFF00}Login","{FF0000}You have entered an invalid password.\n""{38E2EB}Type your password below to {B7E82E}login.","Login","Quit"); return 1; } } return 0; } if(dialogid == DIALOG_VIP_WEAPONS) { if(response) { if(listitem == 0) { if(GetPlayerMoney(playerid) < 35000) { SCM(pid, -1, "You don't have enough cash for that!"); return 1; } else { GivePlayerWeapon(playerid, 31, 250); GivePlayerMoney(playerid, -35000); SCM(pid, -1, "{FFD83D} You have bought an {FF0000}M4 {FFD83D}for {09FF00}$35.000!"); } } if(listitem == 1) { if(GetPlayerMoney(playerid) < 20000) { SCM(pid, -1, "You don't have enough cash for that!"); return 1; } else { GivePlayerWeapon(playerid, 24, 100); GivePlayerMoney(playerid, -20000); SCM(pid, -1, "{FFD83D} You have bought a {FF0000}Deagle {FFD83D}for {09FF00}$20.000!"); } } if(listitem == 2) { if(GetPlayerMoney(playerid) < 15000) { SCM(pid, -1, "You don't have enough cash for that!"); return 1; } else { GivePlayerWeapon(playerid, 29, 200); GivePlayerMoney(playerid, -15000); SCM(pid, -1, "{FFD83D} You have bought an {FF0000}MP5 {FFD83D}for {09FF00}$15.000!"); } } if(listitem == 3) { if(GetPlayerMoney(playerid) < 40000) { SCM(pid, -1, "You don't have enough cash for that!"); return 1; } else { GivePlayerWeapon(playerid, 30, 250); GivePlayerMoney(playerid, -40000); SCM(pid, -1, "{FFD83D} You have bought an {FF0000}AK47 {FFD83D}for {09FF00}$40.000!"); } } } }