Jump to content

BinSlayer1

Members
  • Posts

    491
  • Joined

  • Last visited

Everything posted by BinSlayer1

  1. My idea is to make command handlers instead of the event handlers for login and register
  2. u probably have to post the entire script or at least a bigger part of it.. just because debugging says the error is in a specific line, it could actually be way before it
  3. https://wiki.multitheftauto.com/wiki/Has ... rmissionTo
  4. wow this is so awesome unfortunarely, the mta community is down for the time being could you upload/mirror it somewhere else please?
  5. make 2 windows accounts and it is possible
  6. Thanks works like a charm now I would like to say thanks to everybody who posted here and helped me
  7. no, i'm using the keyboard "w" to accelerate ahh i find it very frustrating that only half script works i wonder what'd be wrong with the unbindKeys function
  8. I tried that using onMapStarting and it's half-working @ 50p: I don't get any errors.. I tried putting some debug text and it tells me gm is on and that it's also checking to see if the keys were already bound. GM does get enabled. But I don't get any text from the second part of the text which is unbindKeys and gm still stays enabled, it won't go off as I accelerate.
  9. bind what key? I understand I should generalize, not make it for 1 key only
  10. I have this in my gm.lua: ghostM = false AFKtimer = nil function checkAFK() thePlayer = source if ( getControlState ( thePlayer, "accelerate" ) ) or ( getControlState ( thePlayer, "brake_reverse" ) ) then setElementData( thePlayer, "overrideCollide.uniqueblah", nil, false ) removeTimer(AFKtimer) end end function GhostMode() thePlayer = source setElementData( thePlayer, "overrideCollide.uniqueblah", 0, false ) if isTimer(AFKtimer) then killTimer(AFKtimer) end AFKtimer = setTimer(checkAFK, 50, 0) end And I have this in my meta.xml: <meta> <script src="gm.lua" type="server" /> </meta> I'm afraid it still doesn't work
  11. Hey, thanks for the fast reply ghostM = false AFKtimer = nil function checkAFK() thePlayer = source if ( getControlState ( thePlayer, accelerate ) ) or ( getControlState ( thePlayer, brake_reverse ) ) then setElementData( thePlayer, "overrideCollide.uniqueblah", nil, false) removeTimer(AFKtimer) end end function GhostMode() thePlayer = source setElementData( thePlayer, "overrideCollide.uniqueblah", 0, false ) if isTimer(AFKtimer) then killTimer(AFKtimer) end AFKtimer = setTimer(checkAFK, 50, 0) end This is what I have. It doesn't give any errors in debugging, but it isn't working either. I'm not sure what the problem is but I'll try to see if it works with events.
  12. I understand that I need to use getControlState (it makes sense), but I don't really know how to use a timer can you give me an example or something? or even for this one. I learn easier when I see the code.
  13. Hi! I'm a beginner ( fine, call me noob ) at scripting in LUA. I'm trying to make a script for a race server. The script is supposed to make the afk-players have ghostmode on start of maps. I thought the script through as this: GM gets enabled on every map-start. When the client presses "w" or "s", their ghostmode gets turned off. This is what I managed to get and it doesn't give any errors, but it doesn't work either, so if anyone could help me correct it I would appreciate it. addEvent('onClientMapStarting', true) function GhostMode() thePlayer = source setElementData( thePlayer, "overrideCollide.uniqueblah", 0, false ) if getKeyState( "w" ) == true or getKeyState( "s" ) == true then setElementData( thePlayer, "overrideCollide.uniqueblah", nil, false ) end end addEventHandler('onClientMapStarting', getRootElement(), GhostMode)
  14. The vehicles are supposed to be Police cars like.. Las Venturas Cop Car It ain't my game. It happens to everyone that plays the map.
  15. Hi I'm hoping this is the right section to address the problem I'm having. In this race map that I have, there are some police cars that are supposed to be there just for roadblocking (they're not players, they're objects). The problem is they aren't much of a roadblock because they do no have collision . Ghostmode is disabled in the server. Players can crash each other, but they cannot crash these cars that were added as Objects via the map editor. My question is how to make them collision-on. Thanks in advance, BinSlayer
×
×
  • Create New...