GetPlayerWeapon

From SA-MP Wiki

Jump to: navigation, search

GetPlayerWeapon


Returns the ID of the player's current weapon.


Parameters:
(playerid)
playeridThe ID of the player to get the weapon of


ReturnsThe ID of the player's current weapon


public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWeapon(killerid) == 38) Ban(killerid); //Ban if they have a minigun
    return 1;
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools