I made a function for checking the player's weapons when scrolling the weapon but it doesn't seem to work..
local guntable = { 23, 30, 32, 20, 9 } -- random id's
function weaponDisable()
weapon = getPedWeapon(localPlayer)
if guntable[weapon] then
else
cancelEvent()
end
end
addEventHandler ("onClientPlayerWeaponSwitch", getRootElement(), weaponDisable)
Someone able to help me with this?