Jump to content

Recommended Posts

He echarías una mano te lo ruego?

Me solucionarías estas líneas?...

function debugJump()
  if PedControlState("jump") then          Aqui el error   ---- attempt to call global ´PedControlState´ (a nil value)
    setElementData(getLocalPlayer(), "jumping", true)
    setTimer(debugJump2, 650, 1)
  end
end
setTimer(debugJump, 100, 0)
function debugJump2()
  setElementData(getLocalPlayer(), "jumping", false)
end

Y luego esta parece ser el mismo error que el de arriba:

function debugShooting()
  if PedControlState("fire") then -- Error-- attempt to call global ´PedControlState´ (a nil value)
    local weapon = getPedWeapon(getLocalPlayer())
    local noise = getWeaponNoise(weapon) or 0
    setElementData(getLocalPlayer(), "shooting", noise)
    if shootTimer then
      killTimer(shootTimer)
    end
    shootTimer = setTimer(debugShooting2, 100, 1)
  end
end
setTimer(debugShooting, 100, 0)
function debugShooting2()
  setElementData(getLocalPlayer(), "shooting", 0)
  shootTimer = false
end

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...