Posts: 1,018
	Threads: 320
	Joined: Jul 2010
	
	
 
	
	
		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.
	
 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,593
	Threads: 34
	Joined: Dec 2007
	
	
 
 
	
	
	
		
	Posts: 1,018
	Threads: 320
	Joined: Jul 2010
	
	
 
	
	
		How is that gonna help me? Thanks
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,593
	Threads: 34
	Joined: Dec 2007
	
	
 
	
	
		it will get all weapon ids and ammo which player have
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,018
	Threads: 320
	Joined: Jul 2010
	
	
 
	
	
		can you set mi that in the code something which I post
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,593
	Threads: 34
	Joined: Dec 2007
	
	
 
	
	
		
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);
    }
}