Jump to content

norby89

Retired Staff
  • Posts

    925
  • Joined

  • Last visited

Everything posted by norby89

  1. function bunnyHop ( source, key, keyState ) if ( isPlayerInVehicle ( source ) ) then local theVehicle = getPlayerOccupiedVehicle ( source ) local x, y, z = getElementVelocity ( theVehicle ) setElementVelocity ( theVehicle, x, y, z + 0.25 ) end end function bindTheKeys() bindKey ( source, "lshift", "down", bunnyHop ) outputChatBox( "Press 'shift' to do a bunny hop (you must be in a vehicle)", source ) end function bindTheKeysOnStart() for i, v in ipairs ( getElementsByType ( "player" ) ) do bindKey ( v, "lshift", "down", bunnyHop ) outputChatBox( "Press 'shift' to do a bunny hop (you must be in a vehicle)", v ) end end addEventHandler ( "onPlayerJoin", getRootElement(), bindTheKeys ) addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), bindTheKeysOnStart ) try this NOTE: it probably won't be the same as the one in SP PS: you can use the boost several times, even in midair tell me if you want that disabled
  2. this is not GTA's pay 'n' spray, it's scripted from scratch of course if you want to change the colors or even the number plates it's scriptable
  3. you cannot unlock that, the only way to do it is to script it
  4. wow time flies doesn't it? I recall the moment when I first tried MTA, we linked a couple of computers together (my neighbour and I), we had no idea what to do at first, we wasted a few hours figuring out how to set up and join the server then I remember there was some sort of a trick that each player had to do when the game started, it involved jacking a car leaving it and getting another one. I was so excited when I saw the other car move, it was the first time it wasn't controlled by some virtual AI! it crashed the next minute but we didn't care.. hmm those moments, priceless.. LONG LIVE MTA!
  5. maybe talk to the admins there? is this for Race or DM?
  6. norby89

    MTA Fast Food

    roflmao awesome man
  7. dunno if the first one would of worked but either way I'd call the timer once instead of infinite times function countdown(count) if (not count) then count = 5 elseif (count > 0) then outputChatBox(count, getRootElement(), 255, 255, 255) setTimer(countdown(count - 1), 1000, 1) else outputChatBox("Go Go Go!!!", getRootElement(), 255, 255, 255) end end addCommandHandler("countdown", countdown) this would work with no parameters ^
  8. Dr. Wankenstein made the original Wankenstein DD which started an avalanche of clones, most of them being slightly modified versions of that map
  9. you got the meta.xml right? remember it's a clientside script
  10. don't forget the fadeCamera ( player, true ) on start
  11. element data is also synced ( setElementData / getElementData ) PS) you shouldn't send data too often tho and for long periods of time, it's bandwith consuming
  12. norby89

    Gamespeed

    that's the point in it, you can make some really neat bullet time with that trick (I haven't tried it in GTA yet tho)
  13. norby89

    Gamespeed

    try to alter the speed clientside
  14. I don't like the idea of that, what if I want to play with my clan's tag and my account name is 'norby89'?
  15. they might have used this http://development.mtasa.com/index.php? ... kyGradient
  16. function checkName() if getClientName ( source ) == "Player" then setClientName ( source, getPlayerUserName ( source ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), checkName ) this should do it (not tested)
  17. sorry I thought you were using setElementVelocity hmm you sure you provided all the necessary optional arguments?
  18. you can change the velocity only for vehicles and players atm
  19. ah there's a serverside setClientName, must have missed that
  20. It's important for the function to be defined first because the first parameter of setTimer is a pointer to that function, if that function does not exist by that time, the timer won't work. Now if you create a timer with a bit of delay (for example onResourceStart, or withing another function) then it doesn't matter if it's below or above since showMessages was already defined. it's not really clear how you're doing it so I assumed this was your whole script, in that case it wouldn't work
  21. the code is fine, just put the timer below the function @tma local variables outside functions will still act like global variables
×
×
  • Create New...