[Help]Weapon dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]Weapon dialog (
/showthread.php?tid=405932)
[Help]Weapon dialog -
nilanjay - 08.01.2013
Hello,
I need help with my /weapon command syntax because it's not working. The command is in dialog form and the dialog style is input.
My code is:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_WEAPON)
{
if(strcmp(inputtext))
{
new weaponid;
if(weaponid > 47) return SendClientMessage(playerid, -1, "[SHOP]:Unknown weapon id!");
if(weaponid < 0) return SendClientMessage(playerid, -1, "[SHOP]:Unknown weapon id!");
new string[128], wname[24];
GetWeaponName(weaponid, wname, sizeof(wname));
format(string, sizeof(string), "[SHOP]:You have bought %s for $1000.", wname);
GivePlayerWeapon(playerid, weaponid, 500);
SendClientMessage(playerid, -1, string);
GivePlayerMoney(playerid, -1000);
}
return 1;
}
return 1;
}
Please tell me what's the problem?
Re: [Help]Weapon dialog -
[FR]Fratzica - 08.01.2013
have you put at the start of the script "#define DIALOG_WEAPON" without "?
if not put it and try again

+ rep me to help others
Re: [Help]Weapon dialog -
nilanjay - 08.01.2013
Yes, I did.
Re: [Help]Weapon dialog -
nilanjay - 08.01.2013
anyone?