[HELP] Ammunition detect
#1

Hello I wonder How can I make ammunition detection for example player has weapon id 30 and 31 and ammunition 700 in the each weapon and max ammunition is 350 and how can I make to detect that and send to admins so it's go something like this

pawn Код:
Weapon id 30-31 || Ammunition found: 700 || Max ammunition is: 350

Thanks.
Reply
#2

https://sampwiki.blast.hk/wiki/GetPlayerWeaponData
Reply
#3

How is that gonna help me? Thanks
Reply
#4

it will get all weapon ids and ammo which player have
Reply
#5

can you set mi that in the code something which I post
Reply
#6

pawn Код:
new Weapon, Ammo;
GetPlayerWeaponData(giveplayerid, 5, Weapon, Ammo); // slot 5 is for AK-47 and M4

if(Weapon > 0 && Ammo > 0) // if player got AK or M4 and ammo more than 0
{
    if(Ammo > 699)
    {
        new str[128];
        format(str,sizeof(str),"Weapon id %d || Ammunition found: %d || Max ammunition is: 350", Weapon, Ammo);
        SendClientMessage(playerid,-1,str);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)