Help with Weapon Shop - 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 with Weapon Shop (
/showthread.php?tid=294114)
Help with Weapon Shop -
Santox14 - 31.10.2011
Hey forum, i created a weapon shop with Dialogs and zcmd for my DM script , it works fine but when i choose a colt , tec , uzi i got in both hands a uzi not in one hand how can i change that? and how can i make when a player dont got enough money then he cant buy a gun ?
Script:
pawn Код:
#define ListDialog 1
#define WeaponDialog 1
#define ShopDialog 1
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == ListDialog)
{
if(response == 0)
{
return 1;
}
if(response == 1)
{
//
}
if(listitem == 0)
{
SendClientMessage(playerid,0xC92020FF,"You Choosed a Colt 45, have Fun with it!");
GivePlayerWeapon(playerid, 22, 500);
return 1;
}
if(listitem == 1)
{
SendClientMessage(playerid,0xC92020FF,"You Choosed an Israel Uzi, have Fun with it!");
GivePlayerWeapon(playerid, 28, 500);
return 1;
}
if(listitem == 2)
{
SendClientMessage(playerid,0xC92020FF,"You Choosed an Tec 9, have Fun with it!");
GivePlayerWeapon(playerid, 32, 500);
return 1;
}
if(listitem == 3)
{
SendClientMessage(playerid,0xC92020FF,"You Choosed a Shotgun, have Fun with it!");
GivePlayerWeapon(playerid, 25, 500);
return 1;
}
}
pawn Код:
CMD:shop(playerid, params[])
{
SendClientMessage(playerid, 0xC92020FF, "You have opened the Shop!");
ShowPlayerDialog(playerid, ListDialog, DIALOG_STYLE_LIST, "Weapon Shop", "Colt45\nIsrael Uzi\nTec9\nShotgun", "OK", "CANCEL");
}
Re: Help with Weapon Shop -
[MG]Dimi - 31.10.2011
if they dont have enough money use if(GetPlayerMoney(playerid) < Weapon Price) and for one, not 2 uzi use
SetPlayerSkillLevel
AW: Help with Weapon Shop -
Santox14 - 01.11.2011
Okay thanks! but i cant find the WEAPON_SKILL for uzi if i type WEAPON_SKILL_UZI i got error just for colt and shotgun ect but not for tec and uzi
Re: Help with Weapon Shop -
grand.Theft.Otto - 01.11.2011
It's
WEAPONSKILL_MICRO_UZI
https://sampwiki.blast.hk/wiki/Skillweapons
AW: Help with Weapon Shop -
Santox14 - 02.11.2011
and tec?
Re: Help with Weapon Shop -
[MG]Dimi - 02.11.2011
Tec is same as Uzi