
adamb
Members-
Posts
32 -
Joined
-
Last visited
Everything posted by adamb
-
Bump, can anyone help me via skype?
-
Did that, still spawns all at 0,0,0
-
getVehicleComponentPosition ( vehicle theVehicle, string theComponent ) Its the vehicle component.
-
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?
-
I hope you know man, but YOU are awesome
-
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..?
-
I'm not a that... experienced scripter. PS; MAGYAR TESOO!
-
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.
-
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?
-
Got an error @ Line 9, expected element, got boolean.
-
Ima try it thank you!
-
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?
-
Thanks to everyone that contributed, it now works! PresTege, thank you, you have solved alot of my problems so far! It worked!
-
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 )
-
Any will do, i just want it to work like this, either trigger a random script or function out of three...
-
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 )
-
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?
-
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?
-
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?
-
Doesn't work..
-
Hmm... How would it work then?
-
It is, under 'ped' there is 'handsup'