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


Messages In This Thread
Help with Weapon Shop - by Santox14 - 31.10.2011, 10:44
Re: Help with Weapon Shop - by [MG]Dimi - 31.10.2011, 18:56
AW: Help with Weapon Shop - by Santox14 - 01.11.2011, 19:10
Re: Help with Weapon Shop - by grand.Theft.Otto - 01.11.2011, 19:31
AW: Help with Weapon Shop - by Santox14 - 02.11.2011, 10:16
Re: Help with Weapon Shop - by [MG]Dimi - 02.11.2011, 13:37

Forum Jump:


Users browsing this thread: 3 Guest(s)