-
Posts
925 -
Joined
-
Last visited
Everything posted by norby89
-
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
-
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
-
you cannot unlock that, the only way to do it is to script it
-
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!
-
looks cool nice job
-
maybe talk to the admins there? is this for Race or DM?
-
now I know it was you!
-
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 ^
-
Dr. Wankenstein made the original Wankenstein DD which started an avalanche of clones, most of them being slightly modified versions of that map
-
you got the meta.xml right? remember it's a clientside script
-
don't forget the fadeCamera ( player, true ) on start
-
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
-
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'?
-
they might have used this http://development.mtasa.com/index.php? ... kyGradient
-
or ][[/color]/code]
-
function checkName() if getClientName ( source ) == "Player" then setClientName ( source, getPlayerUserName ( source ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), checkName ) this should do it (not tested)
-
sorry I thought you were using setElementVelocity hmm you sure you provided all the necessary optional arguments?
-
you can change the velocity only for vehicles and players atm
-
ah there's a serverside setClientName, must have missed that
-
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
-
the code is fine, just put the timer below the function @tma local variables outside functions will still act like global variables
