Check if player has the weapon
#3

Use this function:
Код:
stock
	IsPlayerUsingWeapon(playerid, _weaponid)
{ // Author: VVWVV
	const MAX_WEAPONS_SLOTS = 13;
	static ammo, weaponid;
	for (new i; i != MAX_WEAPONS_SLOTS; i++)
	{
		if (GetPlayerWeaponData(playerid,
			i, weaponid, ammo) == 0)
			return 0;
		if (weaponid == _weaponid)
			return 1;
	}
	return 0;
}
Reply


Messages In This Thread
Check if player has the weapon - by GoldenLion - 11.07.2016, 10:16
Re: Check if player has the weapon - by K0P - 11.07.2016, 10:18
Re: Check if player has the weapon - by VVWVV - 11.07.2016, 10:35
Re: Check if player has the weapon - by GoldenLion - 11.07.2016, 14:27

Forum Jump:


Users browsing this thread: 1 Guest(s)