SA-MP Forums Archive
Nothing happens with the dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Nothing happens with the dialog (/showthread.php?tid=277325)



Nothing happens with the dialog - FreeSoul - 17.08.2011

So,when I click something in the dialog nothing happens.
The dialog pops up,but nothing happens.
The code from when I use the cmd:
Quote:

else if (PlayerToPoint(50.0, playerid, 223.2512,184.8636,1003.0313) && (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 6))
{
ShowPlayerDialog(playerid, 7546, DIALOG_STYLE_LIST, "FBI Agent Armory", "1: Intern Surveillance\n2: Agent Surveillance\n3: Surveillance Camera\n4: Covert Surveillance\n5: Standard Tactical\n6: Medium Tactical\n7: Heavy Tactical\n8: Sharpshooter Tactical\n9: Refill Health and Armor\n10: Night Vision Goggles\n11: Thermal Goggles\n12: Default", "Equip", "Cancel");
}

The code of the dialog
Quote:

else if (dialogid == 7564 && response)
{
new item = listitem;
new sendername[28], string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
if (item == 0)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 43, 100);
GivePlayerWeaponEx(playerid, 3, 1);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has suited himself up with the standard intern equipment.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 1)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 43, 100);
GivePlayerWeaponEx(playerid, 24, 100);
GivePlayerWeaponEx(playerid, 3, 1);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has suited himself up with the standard agent equipment.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 2)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 43, 100);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has taken the instruments needed for being a detective.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 3)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 43, 100);
GivePlayerWeaponEx(playerid, 4, 1);
GivePlayerWeaponEx(playerid, 23, 100);
GivePlayerWeaponEx(playerid, 46, 1);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has taken the equipment needed for covert operations.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 4)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 17, 5);
GivePlayerWeaponEx(playerid, 29, 600);
SetPlayerSkinEx(playerid, 285);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has put on a tactical uniform and geared up with standard equipment.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 5)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 17, 5);
GivePlayerWeaponEx(playerid, 31, 600);
SetPlayerSkinEx(playerid, 285);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has put on a tactical uniform and geared up with medium equipment.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 6)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 16, 5);
SetPlayerSkinEx(playerid, 285);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has put on a tactical uniform and geared up with heavy equipment.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 7)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 23, 400);
GivePlayerWeaponEx(playerid, 34, 50);
GivePlayerWeaponEx(playerid, 46, 1);
SetPlayerSkinEx(playerid, 285);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has put on a tactical uniform and geared up with sharpshooter equipment.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item ==
{
SetPlayerArmourEx(playerid, 100);
SetPlayerHealthEx(playerid, 100);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s places on a Kevlar vest and eats some donuts.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 9)
{
GivePlayerWeaponEx(playerid, 44, 1);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s has equipped a pair of nightvision goggles.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 10)
{
GivePlayerWeaponEx(playerid, 45, 1);
format(string, sizeof(string), "* %s has equipped a pair of thermal goggles.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if (item == 11)
{
new originalskin = PlayerInfo[playerid][pModel];
SetPlayerSkinEx(playerid, originalskin);
}
}

Thanks in advance for your help.
Regards,freesoul


Re: Nothing happens with the dialog - MadeMan - 17.08.2011

Do you use any filterscripts?


Re: Nothing happens with the dialog - FreeSoul - 17.08.2011

Yes I do use. But for other factions,the dialog works...Only that it gives different weapons and has different names..


Re: Nothing happens with the dialog - =WoR=Varth - 17.08.2011

Make sure you return 0 in every end of your OnDialogResponse script.