Jump to content

adamb

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by adamb

  1. Bump, can anyone help me via skype?
  2. Did that, still spawns all at 0,0,0
  3. getVehicleComponentPosition ( vehicle theVehicle, string theComponent ) Its the vehicle component.
  4. Actually, disregard my last [596] = {["mode"]="led", [1]={["pos"]={"rightfrontlight"}, ["color"]={0,0,255}, ["size"]=0.25, ["phase"]=0.0}, rightfrontlight = getVehicleComponentPosition ( sourcecar, rightfrontdummy ) All coronas spawn at 0.0.0 did i mark something wrong?
  5. I hope you know man, but YOU are awesome
  6. So, is it possible for LUA to get the location ( call ) of a dummy in a 3d model, and lets say create a corona at its location? Those dummies, the green squares, they mark the location of where doors turn, headlights and taillights are. so..?
  7. I'm not a that... experienced scripter. PS; MAGYAR TESOO!
  8. number = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} numbers = number [ math.random ( #number ) ] function randomnum outputChatBox ( " The random number is ".. numbers ..". " ) end addCommandHandler ( "callrandom", randomnum ) Not sure at all whether it will work, its my first time trying to help.
  9. for k, v in ipairs(players) do circlearea2 = createColCircle(0, 0, 5) if circlearea2 then attachElements(circlearea2, sourcePlayer) end bindKey(v, "i", "down", "checkdriver") end error: expected element, got nil What did i do wrong?
  10. Got an error @ Line 9, expected element, got boolean.
  11. for k,v in ipairs(getElementsByType("player")) do bindKey(v, "o", "down", "pullover") end local circlearea = createColCircle ( 0, 0, 10 ) function ColShapeHit ( su, matchingDimension ) local detection = isElementWithinColShape ( su, circlearea ) if detection then if ( getElementType ( su ) == "vehicle" ) then setVehicleEngineState ( su, false ) end end end addCommandHandler("pullover", ColShapeHit) Basically supposed to stop the NPC ped in the colsphere, doesn't work for some reason, can anyone look thru it and correct it?
  12. Thanks to everyone that contributed, it now works! PresTege, thank you, you have solved alot of my problems so far! It worked!
  13. Done this, i get Bad arguement on line 10 @ startResource tho... Resources = { [1] = "crazy"; [2] = "mugging"; [3] = "gang"; }; function callouts() local res = getResourceFromName("crazy", "mugging", "gang") local random = Resources [ math.random ( #Resources ) ] startResource ( random ) outputChatBox ( "Dispatch here, all units standby for callout" ) end addEventHandler ( "onResourceStart", resourceRoot, callouts ) setTimer (addEventHandler, 300000, 0) function this ( theResource ) local they = getResourceFromName ( "calloutsbeta" ) if getResourceFromName then restartResource(they) end end setTimer (this, 420000,0 )
  14. Any will do, i just want it to work like this, either trigger a random script or function out of three...
  15. So, out of that, i did this, i get a syntax error near 'myFunctions' myFunctions[1]= startcrazy local startResource ( crazy ) myFunctions[2]= startmugging local startResource ( mugging ) myFunctions[3]= startgang local startResource ( gang )
  16. So basically, i have these function CreateX() function CreateZ() function CreateY() So, i want to make the script use math.random to select a random one of those three above to start with addEventHandler onResourceStart tho i have no idea how to do it.. Can anyone help me out?
  17. Bump. I figured two functions i needed, CapY helped me, tho he couldn't tell me how i'm missing them. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight https://wiki.multitheftauto.com/wiki/Ge ... enPosition can someone give me a hand?
  18. So, i wrote this, it is basically supposed to stop the NPCHLC traffic vehicle's engines off. for k,v in ipairs(getElementsByType("player")) do bindKey(v, "n", "down", "ts") end function onPlayerTarget( thePlayer ) local target = getCameraTarget ( thePlayer ) if ( getElementType ( target ) == "vehicle" ) then setVehicleEngineState ( target, false ) outputChatBox ( "Walk up to the driver side window", source ) end end addCommandHandler("ts", onPlayerTarget) Tho It doesn't work, no errors tho. Any ideas?
  19. adamb

    Tables

    I had a feeling i had to do that. Thank you!
  20. adamb

    Tables

    Just a simple and quick question, is this a correct table? femalenames = {Dwana Sasaki, Kanisha Leishman, Luba Peters, Tina Schwabe, Loria Rodden}
  21. Hmm... How would it work then?
  22. It is, under 'ped' there is 'handsup'
×
×
  • Create New...