30.06.2011, 08:35
Well.. I Made a dialog when you do /buyweapons a Dialog appear with 3 Guns and you buy from them , it's worknig Fine...BUT...let's say i bought a Spas12 from the Dialog and i took it , Let's say i didn't buy the Spas12 yet *Note : I Spawn with Shotgun* , I DOn't want Spas12 but i want Deagle , so i do /buyweapons and choose Deagle , it take from me the money BUT i don't take the gun , i see it in sec then it Disappear and i only stay with Shotgun , same happen with M4 , only the Spas12 works , here is the Dialog :
And this :
Any Solutions ?
Quote:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch (dialogid == ![]() { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -20000); GivePlayerWeapon(playerid, 24); } case 1: // The second item listed { if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -50000); GivePlayerWeapon(playerid, 31); } case 2: // The third item listed { if(GetPlayerMoney(playerid) < 100000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -100000); GivePlayerWeapon(playerid, 27); } } } } } return 1; } |
Quote:
if(!strcmp(cmdtext, "/BuyWeapons", true)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Weapons List", "Desert Eagle ($20,000)\nM4 ($50,000)\nSpas12 ($100,000)", "Purchase", "Cancel"); return 1; } } |
