Help with Weapon Shop
#1

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");
}
Reply
#2

if they dont have enough money use if(GetPlayerMoney(playerid) < Weapon Price) and for one, not 2 uzi use SetPlayerSkillLevel
Reply
#3

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
Reply
#4

It's

WEAPONSKILL_MICRO_UZI

https://sampwiki.blast.hk/wiki/Skillweapons
Reply
#5

and tec?
Reply
#6

Tec is same as Uzi
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)