Weapon check code :s [Fixed]
#1

Were here can I check a player has Weapon "30". I know there is a GivePlayerWeapon(playerid,30,100); inside, But its to purchase bullets.
Reply
#2

https://sampwiki.blast.hk/wiki/GetPlayerWeapon

He needs to have the weapon in his hand to "buy bullets" then.
Reply
#3

Edit: Fixed
Reply
#4

Quote:
Originally Posted by M4DKiLLA
Edit: Fixed
sorry for adding this after you already fixed it, but I started awhile ago so I will post anyway.

pawn Код:
else if (strcmp(text,"7",true) == 0)
    {
        new playerWeapons = GetPlayerWeapon(playerid);
               
        if(playerWeapons == 23)
        {
            new Playermoney = GetPlayerMoney(playerid);

            if (Playermoney < 100)
            {
                SendClientMessage(playerid,red,"You Do not have enough Cash");
                return 1;
            }
       
            GivePlayerMoney(playerid, -100);
            GivePlayerWeapon(playerid,23,300);
            buyammu1[playerid] = 1;
        }
        else
        {
            SendClientMessage(playerid,red,"You Need to buy a Silencer to buy this ammo");
        }
        return 0;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)