Check ALL the players weapons!
#1

Hey, does anyone know how to check ALL the players weapons?

i tried with

Код:
GetPlayerWeapon(playerid)
But apperently that only checks the weapon the player is holding in his hand.... So how do i check for all weapons ?
Reply
#2

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

How can i make like:

if (GetPlayerWeapon(playerid) == 22)

22 = Weapon ID
With

GetPlayerWeaponData .... :/, i don't get it i dont need ammo and all that :/
Reply
#4

Here's a wiki example:
pawn Код:
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
  GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
So, you would use:
pawn Код:
if(weapons[2][0] == 22) { }
2 is the weapon-slot of weaponid 22 (9mm).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)