Jump to content

raventhegosh

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by raventhegosh

  1. 1 hour ago, Zango said:
    
    local last_button_action = 0
    function onClientKey(button, pressOrRelease)
    	if not pressOrRelease then return end
    
    	local boundKeys = getBoundKeys("vehicle_secondary_fire")
    	if not boundKeys then return end
    	if not boundKeys[button] then return end
    	
    	local tick = getTickCount()
    	if tick - last_button_action < 500 then
    		cancelEvent()
    		return
    	end
    	
    	last_button_action = tick
    end
    addEventHandler("onClientKey", root, onClientKey)

    This will limit the vehicle_secondary_fire control to once every 500 ms, it should be enough to block the super jump on bike.

    This applies to all vehicles, so you will need to check for vehicle type if you want to limit it to bikes.

    I used onClientKey because I can't find a smarter way. An alternative is binding a function to the vehicle_secondary_fire keys, but the user can change his binds midways and you would have to check for that at some interval.

    Thks Man, i'll try this S2

  2. Olá, se alguém estiver disposto a gastar um tempinho me ajudando...

    Eu estou montando um servidor e quero modificar a velocidade dos carros com uma script de handling, mas a handling só se aplica quando o player está dentro do carro, no caso os outros player do meu servidor não iram conseguir ter seus carros com a velocidade certa.
    Ai vem o caso, preciso de uma script de auto restart de resources que reinicie a resource a cada ''tantos'' segundos, sou novato em lua, e n sei a sintaxe dessa linguagem, se alguém puder ajudar, ficarei muito grato!!!

×
×
  • Create New...