getPedWeaponSlot | Multi Theft Auto: Wiki Skip to content

getPedWeaponSlot

Client-side
Server-side
Shared

Pair: setPedWeaponSlot

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function gets a ped's selected weapon slot.

Syntax

getPedWeaponSlot ( )

Code Examples

server
function doesPlayerHaveWeapon(source)
local pedSlot = getPedWeaponSlot ( source )
if (pedSlot == 0) then
outputChatBox("Your weapon is not in your hands ;)", source)
end
end
addCommandHandler("weapon", doesPlayerHaveWeapon)

See Also