ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getPickupType

Function

getPickupType

Server and clientPickupsIdentical to MTA:SA

Returns the pickup type: 0 health, 1 armour, 2 weapon, 3 custom model.

Syntax

int getPickupType(pickup thePickup)

Arguments

thePickuppickup
The pickup.

Returns

Type 0-3, or false.

Example

addEventHandler("onPickupHit", root, function(player)
    if getPickupType(source) == 2 then
        outputChatBox("Bron: " .. getWeaponNameFromID(getPickupWeapon(source)), player)
    end
end)

See also