Jump to content

norby89

Retired Staff
  • Posts

    925
  • Joined

  • Last visited

Everything posted by norby89

  1. it should be addEventHandler Lua is case sensitive EDIT: meh you were faster than me
  2. come on guys let's not turn this into a freeroam / anti-freeroam flamewar
  3. it's "brake_reverse" http://development.mtasa.com/index.php? ... trol_names
  4. tell us what error you get
  5. lua uses and / or so 'and' would be correct
  6. open up the console and type 'window' when you're at the main menu
  7. I never had problems with local hosting
  8. dunno about you but if I didn't know about the basics of trig I'd have no idea what sine and cosine are, I'd say it outputs random numbers and probably would ask for help like Atti did Lua doesn't teach you math
  9. well someone who doesn't know trig can find it useless
  10. you might wanna ask your maths teacher or visit this site http://en.wikipedia.org/wiki/Trigonometry and these sites are awesome to help you visualize how the trigonometric circle works http://www.senocular.com/flash/source.php?id=0.114 http://www.edumedia-sciences.com/a348_l ... ircle.html keep in mind that Lua uses radians for math.cos, math.sin etc and MTA uses degrees, so for example if you get a player's rotation you need to convert it to radians when using these functions like this: math.cos ( math.rad ( getPlayerRotation ( getLocalPlayer() ) )
  11. norby89

    Respawn

    use these tags when posting scripts ][[/color]/code]
  12. could you post the fixed function so others can update their scripts please?
  13. I know about that but where exactly EDIT: nevermind, finally got it, it was hidden lol
  14. it depends on the vehicles rotation, if it's ( 0 0 x ) it works otherwise it gets it wrong
  15. this is a simple script that places the camera above the player (GTA2 style) local root = getRootElement() local localPlayer = getLocalPlayer () local update = false function updateCameraPos() local x, y, z = getElementPosition ( localPlayer ) setCameraPosition ( x, y-1, z + 30 ) setCameraLookAt ( x, y, z ) end end function changeCamera() if ( update == false ) then update = true toggleCameraFixedMode ( true ) addEventHandler ( "onClientRender", root, updateCameraPos ) else update = false toggleCameraFixedMode ( false ) removeEventHandler ( "onClientRender", root, updateCameraPos ) end end addCommandHandler ( "cam", changeCamera ) if you wanna know what I mean by 'jerky' change this line to setCameraPosition ( x, y-1, z + 3 )
  16. I experimented with this and no matter what I tried the camera was always jerky I hope someone can find a workaround or a fix for this prob
  17. so that is what happends thats less than a half of it uhm it would probably help more if you uploaded the map itself that causes that
  18. why not report which maps you had trouble with so it can be fixed?
  19. the simplest thing that could be done is to have 2 dimensions, 1 that allows shooting and the other that does not anyway, this is kinda going off topic
  20. uhrrrrm noup, of course not
  21. you can easily change the key just replace "lshift" with "h" in the 2 bindKey functions as I said there's no way to enable the bunny hop from single player atm, and since I don't know how that works this is the best I can do
×
×
  • Create New...