27.05.2017, 09:03
Hi,
In top:
This is my dialog cmd:
This is my dialog response code:
Only this dialog is showing but not giving things
In top:
Код:
enum { DIALOG_UNUSED, DIALOG_LOGIN, DIALOG_REGISTER, DIALOG_WEAPONS };
Код:
CMD:build(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 1.0, 2795.5701,2793.7720,17.6763)) { ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Knife\nBaseball Bat\nAk-47\nMP5\nGrenade\nSniper", "Build", "Cancel"); } return 1; }
Код:
if(dialogid == DIALOG_WEAPONS) { switch(listitem) { case 0: { InventoryWeapon[playerid][Knife]++; SendClientMessage(playerid,-1,"Knife Given!"); } case 1: { InventoryWeapon[playerid][BaseballBat]++; } case 2: { InventoryWeapon[playerid][Ak47]++; } case 3: { InventoryWeapon[playerid][MP5]++; } case 4: { InventoryWeapon[playerid][Grenade]++; } case 5: { InventoryWeapon[playerid][Sniper]++; } }