17.04.2014, 09:05
I have this script:
When I select a option, I appear like I press "EXIT". And When O select "EXIT" Nothing happens.
A PICTURE [click]
pawn Код:
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
GivePlayerMoney(playerid, -150);
GivePlayerWeapon(playerid, 14, 1);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit o floare pentru {00FF40}150${FFFFFF}.");
}
if(listitem == 1)
{
GivePlayerMoney(playerid, -1500);
GivePlayerWeapon(playerid, 23, 50);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un SILENCED 9MM cu 50 gloante pentru {00FF40}1.500${FFFFFF}.");
}
if(listitem == 2)
{
GivePlayerMoney(playerid, -2500);
GivePlayerWeapon(playerid, 24, 60);//deagle
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un DEAGLE cu 60 gloante pentru {00FF40}2.500${FFFFFF}.");
}
if(listitem == 3)
{
GivePlayerMoney(playerid, -3500);
GivePlayerWeapon(playerid, 25, 25);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un Shotgun cu 25 gloante pentru {00FF40}3.500${FFFFFF}.");
}
if(listitem == 4)
{
GivePlayerMoney(playerid, -4500);
GivePlayerWeapon(playerid, 29, 50);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un MP5 cu 50 gloante pentru {00FF40}4.500${FFFFFF}.");
}
if(listitem == 5)
{
GivePlayerMoney(playerid, -5500);
GivePlayerWeapon(playerid, 31, 100);
SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un M4 cu 100 gloante pentru {00FF40}5.500${FFFFFF}.");
}
else // Pressed ESC or clicked cancel
{
SendClientMessage(playerid, COLOR_GREY, "* Ai decis sa nu cumperi arme *");
return 1;
}
}
return 1;
}
A PICTURE [click]