-
Posts
2,753 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Captain Cody
-
If you are looking for the 1.5 download https://mirror.multitheftauto.com/mtasa/ ... sa-1.5.exe
-
Well I know about those, was just wondering if there was anything to make it stay with the component.
-
Any way to attach objects to vehicle components instead of attaching them to vehicle?
-
local team= getTeamFromName("Civilian") setPlayerTeam(source, team)
-
It will trigger both functions You have one of the functions trigger another allowing you to bind more then one function to same event-handler.
-
Have the first function trigger the secound Using functionname (things you wanna send over, seperated by a space) example: test (appleamount,deadpeople)
-
That's because the clothing item names can be used instead of the ids https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs Other objects you have to use the actual id.
-
Not to sure then, not really that experienced with stuff such as this.
-
Not tested at all, may need some ajusting. But time = 50000 local ap = 0 local apmode = true local images ={ ":Main/files/images/menu_bg1.jpg", ":Main/files/images/menu_bg2.jpg", ":Main/files/images/menu_bg3.jpg", ":Main/files/images/menu_bg4.jpg", ":Main/files/images/menu_bg5.jpg", ":Main/files/images/menu_bg6.jpg" } function testBackground(current) setTimer(triggerAlpha,time-10000,1) setTimer(setAlpha,5000,2,true) image = images[current] if current == 6 then current = 0 end ia = current + 1 if isTimer (timer) then KillTimer(timer) end timer = nil timer = setTimer(testBackground,time,1,ia) end testBackground(1) function triggerAlpha () setAlpha (false) setTimer(setAlpha,5000,1,false) end function setAlpha (increase) if not apmode then return end app = ap if increase then ap = app + 50 else ap = app - 50 end end function createImage() dxDrawImage(s[1]*0/1440,s[2]*0/900, s[1]*1440/1440,s[2]*900/900, image, 0, 0, 0, tocolor(255, 255, 255, ap),false) end addEventHandler("onClientRender",root,createImage) Should be quite easy to ajust the timers for fading in / fading out if you set the right values.
-
I'm trying to fix that atm.
-
So you want them to fade in / out?, easy enough.
-
I think I'll just have it trace an object, and have the object move to the destination using moveObject. But set the objects alpha to 0
-
Try this time = 5000 local ap = 0 local apmode = true local images ={ ":Main/files/images/menu_bg1.jpg", ":Main/files/images/menu_bg2.jpg", ":Main/files/images/menu_bg3.jpg", ":Main/files/images/menu_bg4.jpg", ":Main/files/images/menu_bg5.jpg", ":Main/files/images/menu_bg6.jpg" } function testBackground(current) if apmode == true then if ap < 255 then ap = ap + 5 else ap = 255 end else if ap > 0 then ap = ap - 5 else ap = 0 end end image = images[current] if current == 6 then current = 0 end ia = current + 1 if isTimer (timer) then KillTimer(timer) end timer = nil timer = setTimer(testBackground,time,1,ia) end testBackground(1) function createImage() dxDrawImage(s[1]*0/1440,s[2]*0/900, s[1]*1440/1440,s[2]*900/900, image, 0, 0, 0, tocolor(255, 255, 255, ap),false) end addEventHandler("onClientRender",root,createImage) The timer defines the image, and the settings The onClientRender creates the actual image.
-
Oh wait time = 5000 local ap = 0 local apmode = true local images ={ ":Main/files/images/menu_bg1.jpg", ":Main/files/images/menu_bg2.jpg", ":Main/files/images/menu_bg3.jpg", ":Main/files/images/menu_bg4.jpg", ":Main/files/images/menu_bg5.jpg", ":Main/files/images/menu_bg6.jpg" } function testBackground(current) if apmode == true then if ap < 255 then ap = ap + 5 else ap = 255 end else if ap > 0 then ap = ap - 5 else ap = 0 end end image = images[current] if current == 6 then current = 0 end -- outputChatBox(image) dxDrawImage(s[1]*0/1440,s[2]*0/900, s[1]*1440/1440,s[2]*900/900, image, 0, 0, 0, tocolor(255, 255, 255, ap),false) ia = current + 1 if isTimer (timer) then KillTimer(timer) end timer = nil timer = setTimer(testBackground,time,1,ia) end testBackground(1) This checks if timer is still there if so kills it and sets it to nil, then creates a new one. - And fixed your flashing timer was not defined. WAIT nvm, lemme hurry up and script something to fix that.
-
Well something like that was what I was originally going to do, was just wondering if there was any other ways. Guess I'll go with something such as that.
-
local ap = 0 local apmode = true local images ={ ":Main/files/images/menu_bg1.jpg", ":Main/files/images/menu_bg2.jpg", ":Main/files/images/menu_bg3.jpg", ":Main/files/images/menu_bg4.jpg", ":Main/files/images/menu_bg5.jpg", ":Main/files/images/menu_bg6.jpg" } function testBackground(current) if apmode == true then if ap < 255 then ap = ap + 5 else ap = 255 end else if ap > 0 then ap = ap - 5 else ap = 0 end end image = images[current] if current == 6 then current = 0 end -- outputChatBox(image) dxDrawImage(s[1]*0/1440,s[2]*0/900, s[1]*1440/1440,s[2]*900/900, image, 0, 0, 0, tocolor(255, 255, 255, ap),false) ia = current + 1 timer = setTimer(testBackground,500,1,ia) end testBackground(1) Try that.
-
Well atm it is not adding onto i for some reason.
-
This is indeed outputting the image. I threw in outputChatBox(image) and it is indeed outputting the image file path. So it's something wrong on your side. But for some reason it is only outputting the first image. I'll fix it and post code
-
The last part of set timer defines current. And I'll run a quick test on it and see if I can figure out the issue
-
/\ Try that, added something to reset it once it gets to the end.
-
Try for i,v in pairs (images) do image = v end But you'd have to figure out a way to add in a pause. Orrr time = 500 'Change it' i = 0 setTimer(setImage,time,#images,i + 1) function setImage (current) image = images[current] if current = #image then i = 0 end end
-
Is there any way to slowly move a camera using set camera matrix, or some similar function. Trying to make a camera slowly move around the map behind login screen, but cannot figure out how I'd do this without having to define a hundred points in a table that it slowly loops about.
-
local images ={ "Main/files/images/menu_bg1.jpg", "Main/files/images/menu_bg2.jpg", "Main/files/images/menu_bg3.jpg", "Main/files/images/menu_bg4.jpg", "Main/files/images/menu_bg5.jpg", "Main/files/images/menu_bg6.jpg" } Eh?
-
local images ={ {"Main/files/images/menu_bg1.jpg"}, {"Main/files/images/menu_bg2.jpg"}, {"Main/files/images/menu_bg3.jpg"}, {"Main/files/images/menu_bg4.jpg"}, {"Main/files/images/menu_bg5.jpg"}, {"Main/files/images/menu_bg6.jpg"} } Meh?
-
You need to make something to save them. Or easier way is to just make a script that creates them https://wiki.multitheftauto.com/wiki/CreateTeam