Hi!
I would like to cancelEvent() the fire when i press the "tab" button.
I tryed with this code, but it doesn't work.
update:
I think the 'onClientPlayerWeaponFire' can't cancelEvent(), but I do not know how to replace it.
function playerPressedKey(button, press)
if getElementData(localPlayer, "char >> usingWeapon")[1] then
if (press) and button == "tab" then
return true
end
return false
end
end
addEventHandler("onClientKey", getRootElement(), playerPressedKey)
addEventHandler('onClientPlayerWeaponFire',getRootElement(),function()
if playerPressedKey then
cancelEvent()
end
end)