28.06.2013, 14:47
Im trying to setup this basic dialog with items list, but when i get in-game and try to spawn anything from the list, nothing happens, the guns are not given and messages are not sent. Here's the code:
plz helpp
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 24, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a Desert Eagle with 9999 bullets.");
}
case 1:
{
GivePlayerWeapon(playerid, 23, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a Silenced 9mm with 9999 bullets.");
}
case 2:
{
GivePlayerWeapon(playerid, 22, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a 9mm with 9999 bullets.");
}
case 3:
{
GivePlayerWeapon(playerid, 32, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a Tec-9 with 9999 bullets.");
}
case 4:
{
GivePlayerWeapon(playerid, 28, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a Micro-uzi with 9999 bullets.");
}
case 5:
{
GivePlayerWeapon(playerid, 29, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a MP5 with 9999 bullets.");
}
case 6:
{
GivePlayerWeapon(playerid, 25, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a pump shotgun with 9999 bullets.");
}
case 7:
{
GivePlayerWeapon(playerid, 26, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a sawn-off shotgun with 9999 bullets.");
}
case 8:
{
GivePlayerWeapon(playerid, 27, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a Combat Shotgun with 9999 bullets.");
}
case 9:
{
GivePlayerWeapon(playerid, 31, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a M4 rifle with 9999 bullets.");
}
case 10:
{
GivePlayerWeapon(playerid, 30, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a AK-47 rifle with 9999 bullets.");
}
case 11:
{
GivePlayerWeapon(playerid, 34, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a Sniper rifle with 9999 bullets.");
}
case 12:
{
GivePlayerWeapon(playerid, 33, 9999);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a Country Rifle with 99999 bullets.");
}
case 13:
{
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, 0xFF9900AA, "You have equipped a new body vest.");
}
}
}
}
}
return 1;
}