07.02.2017, 10:41
(
Last edited by huansohn; 07/02/2017 at 11:23 AM.
)
code : define
Code : Commands
Code: Dialog
When F5
Quote:
#define LAYBANGDAN1 (5081) |
Quote:
CMD:laybangdantest(playerid, params[]) { return ShowPlayerDialog(playerid, LAYBANGDAN1, DIALOG_STYLE_LIST, "CHE TAO BANG DAN","M4", "Chon", "Huy Bo"); } |
Quote:
if(dialogid == LAYBANGDAN1) { if(response) { switch(listitem) { case 0: // M4 Test { new weapon, ammosd; GetPlayerWeaponData(playerid, 2, weapon, ammosd); if(weapon == 31) } if(PlayerInfo[playerid][pMats] > 100) { PlayerInfo[playerid][pMats] -= 100; GivePlayerAmmoEx(playerid, weapon, 50); SetPlayerArmedWeapon(playerid, weapon); SendClientMessageEx(playerid, COLOR_YELLOW, "Ban da che tao 1 bang dan cho khau sung M4 cua ban."); } else { SendClientMessageEx(playerid, COLOR_YELLOW, "Ban khong du vat lieu."); } else { SendClientMessageEx(playerid, COLOR_YELLOW, "Ban khong co vu khi , nen khong the che tao dan"); } } |
Quote:
./includes/OnDialogResponse.pwn(400) : error 002: only a single statement (or expression) can follow each "case" ./includes/OnDialogResponse.pwn(400) : error 017: undefined symbol "LAYBANGDAN1" ./includes/OnDialogResponse.pwn(400 -- 402) : error 001: expected token: "}", but found "if" ./includes/OnDialogResponse.pwn(400 -- 402) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |