-
Posts
740 -
Joined
-
Days Won
16
Everything posted by Tails
-
You need to extract this file http://qs.lc/8efv2
-
I'd really like to use your gridlists but I'm afraid I need to go back to CEGUI as they don't scale well with different resolutions.
-
Would be nice if this could replace the in-game editor object browser using a combination of createBrowser and API's to get the object ID's. If you can pull that off, that would be so awesome. It could become the default object browser.
-
http://www.gtagarage.com/mods/show.php?id=63
-
The standard CEGUI gridlists are so bad that I just have to use yours. So it will have to be either or both of the options you mentioned then. Any plans for the future though to implement horizontal scrolling? Edit: Oh, another thing. Can you make the all the dx elements relative, so they scale with every resolution and the positions stay the same?
-
@ t3ws Is there any way you can fix this? The gridlist doesn't scroll sideways like the CEGUI one does. The text is also centered.
-
Add a button in one or both of these menu's, followed by a small popup asking whether you want to add the contents of the current folder to the meta.xml with these options: 'Yes', 'No' or 'Change settings' (or have the settings on the sides). If you hit Yes then no questions asked, the meta.xml file has been updated using the default settings. Preferably an option to bypass the whole popup window so everything goes automatically. If it's done this way, then this will become a very viable tool, even for the smallest of scripts. Otherwise not many people will go through the effort of having to load up the tool elsewhere and copy and paste the path of their resource folder and what not. Just a way to get the entire folder's content into a meta file with one or two clicks is what most people need anyway, the options to change settings is just an extra and should be able to be skipped. By default all files should come out like this: Taking into account your idea about client and server folders: Also be sure to take into account other folders: If there's a meta.xml already in place, then the tool should only add to it when possible and not replace it.
-
Thanks for releasing, this will surely come in handy.
-
Kenix, you should update this tool to grab files from a resource's folder automatically and have it update the meta.xml automatically. So if I were to place 20 images inside the folder, the meta.xml gets updated automatically. I'm not sure if this works through Windows Explorer, but you could make your own explorer to make it possible. Or perhaps something where you have to drag the files on top of a meta.xml.
-
Thank you, Dealman. And MrTasty for clarifying. I appreciate it!
-
Okay, I've fixed that. The problem on line 17 still remains however, "Loading script failed: unexpected symbol near '['" local allAmbiMarkers[i] = createMarker(v[1], v[2], v[3], ambiType,ambiSize, aR ,aG, aB) Been trying to fix it for hours now, haha
-
A comma at the end is never an issue . Even if I remove the v[1],v[2],v[3] from the line, it's still giving the same error, so it has to be the . Edit: Had a typo on line 16: ambiMarkersA should be ambiMarkers. However, still didn't fix the problem.
-
You don't need to take 'your' resolution. You need to take the resolution you created the GUI for in the first place. So if you're working on some GUI, take your resolution and use it in your code. I'll show you what I mean. Here's a piece of code from one of my resources. The text displayed by dxDrawBorderedText (combined with the function below it) will show the same for every resolution even beyond 1080p. function dxDrawBorderedText(text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI) local sWidth,sHeight = guiGetScreenSize() local sw,sh = 1280,960 dxSetAspectRatioAdjustmentEnabled(true) dxDrawText(text, x/sw*sWidth +4, y/sh*sHeight +4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth -4, y/sh*sHeight +4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth +4, y/sh*sHeight -4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth -4, y/sh*sHeight -4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth +1, y/sh*sHeight +4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth -1, y/sh*sHeight +4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth +1, y/sh*sHeight -4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth -1, y/sh*sHeight -4, w/sw*sWidth, h/sh*sHeight, tocolor(0, 0, 0, 255), scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x/sw*sWidth, y/sh*sHeight, w/sw*sWidth, h/sh*sHeight, color, scale/sw*sWidth, font, alignX, alignY, clip, wordBreak, postGUI) end function drawMyText() dxDrawBorderedText("My cool text", 967, 828, 1089, 905, tocolor(195, 195, 195, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) end As you can see the x,y's are 967, 828, 1089, 905. That's based off of my resolution (1280x960). So, when using the code above, adjust the resolution to the one you're working on then adjust the xy's for the drawText in the second function. It should scale on all resolutions. @Lock7130 You can easily adjust the code to work with dxDrawRectangle as well but be sure every parameter corresponds to that function https://wiki.multitheftauto.com/wiki/DxDrawRectangle
-
I'm getting an unexpected symbol near '[' at allMarkers[i] = createMarker(v[1], v[2], v[3]) or on line 17 in my code. I just can't figure out why that is. Been changing it for the past 1.5 hours now. allAmbiMarkers = {} ambiMarkers = {[1] = {-1963.7998046875,454.2998046875,0.30000001192093},[2] = {-1963.7998046875,454.2998046875,6.6999998092651}, [3] = {-1963.7998046875,454.2998046875,13.10000038147},[4] = {-1953.7998046875,454.2998046875,13.10000038147}, [5] = { -1943.5,454.2998046875,13.10000038147 },[6] = {-1933.400390625,454.2998046875,13.10000038147}, [7] = {-1923.2001953125,454.2998046875,13.10000038147},[8] = {-1923.2001953125,454.2998046875,6.6999998092651}, [9] = {-1923.2001953125,454.2998046875,0.30000001192093}, } ambilightEnabled = false function handleAmbilight(cmd, switch) if cmd then ambilightEnabled = not ambilightEnabled end if ambilightEnabled == true then for i, v in ipairs(ambiMarkers) do local allAmbiMarkers[i] = createMarker(v[1], v[2], v[3], ambiType,ambiSize, aR ,aG, aB) end else for index, marker in ipairs(entryMarkers) do if (allAmbiMarkers[i] and isElement(allAmbiMarkers[i])) then destroyElement(allAmbiMarkers[i]) end end end end addCommandHandler("ambilight",handleAmbilight)
-
Thank you very much! I'm trying to destroy a bunch of markers that I've spawned using your method but it can't find the element even though they spawn. Any ideas? ambilightEnabled = false function handleAmbilight(cmd, switch) if cmd then ambilightEnabled = not ambilightEnabled end for _, v in ipairs(ambiMarkers) do if ambilightEnabled == true then local ambiMarker = createMarker(v[1], v[2], v[3], ambiType,ambiSize, aR ,aG, aB) else destroyElement(ambiMarker) end end end addCommandHandler("ambilight",handleAmbilight)
-
This might be a rather embarrassing question... but I was really wondering how to make the code below a little more efficient. I probably could manage to shorten the code but it would take a long time to figure out how I do that. I'd really appreciate your guys' input on this. As you can see I'm I got several markers all pointing to the same destination. The entrance markers have one destination and the exit markers have one destination. I've always learned that copy and pasting code like this is that in the end it's going to turn out really bad for your script and how you're managing it. It's way too inefficient. Not only is it going to be resource-intensive but it's also going to be one heck of a job to make tiny adjustments to the code. For some reason, though, I always manage to find myself writing code like how it's written below because it's the only way that makes sense to me. In all honesty, I kind of exaggerated the code below a little bit but it's only to show you that I don't know another way of doing it. ENTRANCE_1 = createMarker(-1962.752, 440.72, 36.172,"arrow",2,251,253,5) ENTRANCE_2 = createMarker(-1962.634, 434.199, 36.172,"arrow",2,251,253,5) ENTRANCE_3 = createMarker(-1946.38, 456.753, 36.172,"arrow",1.8,251,253,5) ENTRANCE_4 = createMarker(-1939.389, 457.292, 36.172,"arrow",1.8,251,253,5) ENx,ENy,ENz,ENr = -1943.941, 418.03, -4.327, 3.084 -- destination (inside) EXIT_1 = createMarker(-1942.011, 415.468, -3.427,"arrow",1.8,251,253,5) EXIT_2 = createMarker(-1946.967, 415.51, -3.427,"arrow",1.8,251,253,5) EXIT_3 = createMarker(-1923.083, 445.064, -0.25,"arrow",2,251,253,5) EXIT_4 = createMarker(-1924.974, 438.646, -0.25,"arrow",2,251,253,5) EXx,EXy,EXz,EXr = -1970.884, 437.612, 35.172, 89.306 --destination (outside) function enterRoom(player) local elementType = getElementType(player) if elementType == "player" and not isPedInVehicle(player) then if source == ENTRANCE_1 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,ENx,ENy,ENz) elseif source == ENTRANCE_2 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,ENx,ENy,ENz) elseif source == ENTRANCE_3 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,ENx,ENy,ENz) elseif source == ENTRANCE_4 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,ENx,ENy,ENz) elseif source == EXIT_1 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,EXx,EXy,EXz) elseif source == EXIT_2 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,EXx,EXy,EXz) elseif source == EXIT_3 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,EXx,EXy,EXz) elseif source == EXIT_4 then fadeCamera(false,1.0,0,0,0) setTimer(fadeCamera,1200,1,true,1.0,0,0,0) setTimer(setElementPosition,1000,1,player,EXx,EXy,EXz) end end end addEventHandler("onClientMarkerHit",resourceRoot,enterRoom) Here another example of bad coding. Isn't there a way so you only have to write the functions down once? function toggleWindow() if guiGetVisible(WINDOW) then guiSetVisible(WINDOW,false) showCursor(false) showPlayerHudComponent("all",true) showChat(true) else guiSetVisible(WINDOW,true) showCursor(true) showPlayerHudComponent("all",false) showChat(false) end end
-
Cody, read my reply to your other post about vehicleHandling. It should give you some more insight on this matter. Here: https://forum.multitheftauto.com/viewtopic.php?f=91&t=94812 In the code you can see the properties are 'seperated' from the table.
-
Try using a different url from a different site. Back in the day we used to stream songs from kiwi6 all the time but they just stopped working all of a sudden.
-
What do you mean? Server side: function interCity() local train = createVehicle(538,-1948.413, -0.929, 25.711) end addEventHandler("onResourceStart",resourceRoot,interCity) Yes, you can enter the train now. But try it for yourself, it will only go in one direction. Trains just confuse me. They never do what I want.
-
Nope, the train refuses to go in the opposite direction.
-
Sure is. I thought I tested it my code server side but apparently I didn't. There's another issue, however, the train will only go in one direction when driving it? Thanks, ALw7sH, I did not know that.
-
Expected ped getting resource-data in debug
-
It's not letting me enter any train. Only when I spawn them in through freeroam panel. Did you check the code? Does it work for you?
-
For some reason it's not letting me enter the train, same thing on server side. WarpPedIntoVehicle isn't working either. function interCity() local train = createVehicle(538,-1948.413, -0.929, 25.711) end addEventHandler("onClientResourceStart",resourceRoot,interCity) Any ideas?
-
There's a couple things you can do First, press E until your cursor turns red then try selecting the object. Maybe you have to zoom out a little first. Second, you can try and find the lights through the object browser and get the object ID from there, then remove it using removeWorldModel.