get_gun

Returns the gun that the player is currently holding or that he has in his backpack

modules.get_gun(backpack: boolean?)

Parameters

  • backpack: Set to true if you want to find the gun in backpack else it will find the gun in character


Example

local gun = modules.get_gun(false) -- will search the players character for a gun  being held
if not gun then 
    local backpack_gun = modules.get_gun(true) -- will search for a gun in the players backpack
    print(backpack_gun)
end 

Last updated