28.11.2012, 19:11
Alright so this is my dialog
So my problem is when player goes to pickup the dialong keep re showing every 1 second even if i press cancel , what would be the fix
pawn Код:
new ammupickup1;
pawn Код:
#define DIALOG_AMMU 80
pawn Код:
ammupickup1 = CreateDynamicPickup(1317, 1, 308.2660,-141.4643,999.6016 , -1, -1, -1, 100.0);
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
if(pickupid == ammupickup1)
{
ShowPlayerDialog(playerid,DIALOG_AMMU,DIALOG_STYLE_LIST ,"Ammu Nation","Deagle 2000$ (30 Time In LS)\nShotgun 1500$(10 Time In LS)\nColt 1000$ ( 10 Time In LS)\nRifle 1500$\nUZI 1000$\nAK-47 6000$","Ok","Cancel");
return 1;
}
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_AMMU)
{
if (response == 1)
{
switch(listitem)
{
case 0:
if(GetPlayerPCash(playerid)>=2000 && PlayerInfo[playerid][pConnectTime] > 15)
{
GivePlayerWeaponEx(playerid,24,100);
GivePlayerPCash(playerid, - 2000);
}
else
{
SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money Or Time In LS");
}
case 1:
{
if(GetPlayerPCash(playerid)>=3000 && PlayerInfo[playerid][pConnectTime] > 15)
{
GivePlayerWeaponEx(playerid,25,50);
GivePlayerPCash(playerid, - 3000);
}
else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
}
case 2:
{
if(GetPlayerPCash(playerid)>=1000 && PlayerInfo[playerid][pConnectTime] > 15)
{
GivePlayerWeaponEx(playerid,22,150);
GivePlayerPCash(playerid, - 1000);
}
else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
}
case 3:
{
if(GetPlayerPCash(playerid)>=1000 && PlayerInfo[playerid][pConnectTime] > 15)
{
GivePlayerWeaponEx(playerid,33,60);
GivePlayerPCash(playerid, - 1000);
}
else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
}
case 4:
{
if(GetPlayerPCash(playerid)>=1000 && PlayerInfo[playerid][pConnectTime] > 15)
{
GivePlayerWeaponEx(playerid,32,200);
GivePlayerPCash(playerid, - 1000);
}
else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
}
case 5:
{
if(GetPlayerPCash(playerid)>=6000 && PlayerInfo[playerid][pConnectTime] > 15)
{
GivePlayerWeaponEx(playerid,30,250);
GivePlayerPCash(playerid, - 6000);
TogglePlayerControllable(playerid,true);
}
else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
}
}
}
}
So my problem is when player goes to pickup the dialong keep re showing every 1 second even if i press cancel , what would be the fix