Jump to content

What's wrong? please help :(


Recommended Posts

Posted

What's wrong?

scirpt:

plalyer-> seat to vehicle-> pres space and draw handbrake image

debugscript errors :(((

code:

function hand ( thePlayer )
local theVehicle = getPedOccupiedVehicle ( thePlayer )
   if theVehicle then
      dxDrawImage(200,110,100,100,"hand.png", 255,255,255,true, theVehicle, thePlayer)
   end
end
bindKey("space","down", hand)

  • Moderators
Posted

On client-side, bindKey's first argument is not the player's element. (what passed to function)
So thePlayer is not a player-element, it's the pressed-key (string).

You should use localPlayer.

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...