Jump to content

Tails

Members
  • Posts

    740
  • Joined

  • Days Won

    16

Everything posted by Tails

  1. I believe only server-side commands can be blocked.
  2. Been checking it out on your server. Really like what you did.
  3. Tails

    2 Clients

    I think VMWare is your best option. However, probably not going to work, what if you install a second version of GTA and MTA then run it through sandboxie? Just an idea.
  4. Tails

    2 Clients

    Sandboxie won't work. Already tried that a while ago. It used to work though in the early versions of MTA.
  5. I don't think so but you can use http://www.colorpickertool.com/. Though you can try to make your own function to convert R,G,B values to a 'FFFF0000' value. Don't ask me how. Maybe there's already something for it if you look it up.
  6. Well, in the other topic it says it specifies a hex color in the form of AARRGGBB, AA stands for Alpha, RR for red, GG for green and BB for blue. So I'm guessing this would make it red for you: tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000") FF means 255 or the highest possible value for a color and 0 means nothing or black. It's just a hex color code except for the first two characters which is the alpha. Also try this: tl:FFFF0000 tr:FF00FF00 bl:FF0000FF br:FFFFFFFF")
  7. KalashnikovZ, Try to load the TXD files before the DFF. So not: but: Also, in your code: "skins/triadb.dff", 118 and in your meta file it says "skinek/triadb.dff".
  8. Hi HappyMeal, guiSetProperty(theImage, "ImageColours", "tl:FFD7D7D7 tr:FFD7D7D7 bl:FFD7D7D7 br:FFD7D7D7") More info: https://forum.multitheftauto.com/viewtopic.php?f ... lit=+color
  9. Tails

    [HELP] Trigger

    Hi 1LoL1, You can put the commandHandler on the server-side and call the client-side function from there as well. Also, you cannot use "test" as the command, it will not work, use something else like "test1". -- Server function showGUI(source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Premium")) then triggerClientEvent(source,"TESTT",root) else outputChatBox("bla bla bla",source,255,0,0,true) end end addCommandHandler("test1",showGUI) -- Client function showGUI() TEST() showCursor(true) local screenW,screenH = guiGetScreenSize() local windowW,windowH = guiGetSize(Window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(Window,x,y,false) end addEvent("TESTT",true) addEventHandler("TESTT",root,showGUI)
  10. You should try and find a different source for the mp3's. They don't have most stuff.
  11. By the way, I highly recommend GUI Editor when working with GUI. If you're going to use it, just try to stick with the regular GUI stuff. The dxGui's don't have functions like onClientGUIClick and will require extra coding to create such functions. Link: https://forum.multitheftauto.com/viewtopic.php?f ... =guieditor
  12. onClientGuiClick only works if you're pointing it to the source (the button). Like so: button1 = guiCreateButton(0.77, 0.94, 0.07, 0.09, "Click me", true, main.background) function message() if source == button1 then -- Source is the source of onClientGUIClick that is clicked on, in this case the button. outputChatBox("Hello world") end end addEventHandler("onClientGUIClick",resourceRoot,message) If you have more than one button you can add them like so: function message() if source == button1 then outputChatBox("Hello world") elseif source == button2 then outputChatBox("Hello mars") end end addEventHandler("onClientGUIClick",resourceRoot,message)
  13. Because you have relative set to 'true', you'll need to use values like: 0.01, 0.18, 0.37, 0.25 instead of 1169, 416, 501, 0. You might have to adjust the values to match the same positions again. Do this for every gui element in your script. If you're using 0 , 0 , 0.42, 0.1 for the edit box, that means it will be in the corner of the window because the x and y values are 0, 0 and relative is set to 'true'. So the edit box will be relative to its parent (the window). The window will be relative to the screen.
  14. You need to use values between 1 and 0 when you have relative set to true. relative: This is whether sizes and positioning are relative. If this is true, then all x,y,width,height floats must be between 0 and 1, representing measures relative to the parent.
  15. Thank to all who've tried to help. I managed to fix this using some very simple math. It's how I had it in mind from the start. Here's the final code: width = 0 maxWidth = 480 increment = maxWidth/secs -- secs is defined elsewhere for the length of the song setTimer(function() width = width+increment end ,1000,secs) function displayTitle() dxDrawRectangle(24, 192, 480, 8, tocolor(255, 255, 255, 255), false) dxDrawRectangle(24, 192, width, 8, tocolor(55, 55, 55, 255), false) end addEventHandler("onClientRender",root,displayTitle) @Sasu, Someone else came up with something very similar using getTickCount too. It worked so I'll assume yours will work just as well. I won't be using it, though, as I wanted to come up with something much simpler and straightforward. But thanks for your contribution because it certainly helps.
  16. I need to calculate it based on the duration of the song (secs). GetSoundPosition won't work in my case because of the type of source.
  17. Where do I type that in? Is 'progress', the seconds? When I type setTimer( function() width = (secs * 479) / 100 end ,1000,secs ) I get expected vector 2 at argument 3 for the dxDrawRectangle. Or width = (secs * 479) / 100 setTimer( function() width = width+width end ,1000,secs ) Not sure what to do here.
  18. Hello fellow MTA scripters, So, I've been trying to solve this calculation for some time now. What I have is the 'secs' which is the duration of the song. I'm trying to fill up a bar going from 0 to 479 in width but I must calculate how much to add for every second in the song until it gets to 479. I've tried all sorts of things, but this is what I have at the moment and I just don't know what to do anymore. Does anyone know how to solve the math problem? Any help is much appreciated! progressBarMin = 0 -- = 0% progressBarMax = 479 -- = 100% width = secs / progressBarMax incremental = width+width setTimer( function() width = width+incremental end ,1000,secs ) dxDrawRectangle(17, 175, width, 4, tocolor(255, 255, 255, 255), false)
  19. Thank you t3wz. I will study it and come back here if I have more questions.
  20. How do you project the text onto the target? Is there anyway to make the target visible? Or is the image going to be the target? I don't get it at all.
  21. But how do I match the render target to the dxDrawText position and size? Because the text by it self is already in the correct position. I just randomly typed in that 800,700 for the target creation to see what I'm doing.
  22. I don't know. That whole function just don't seem to work for me. All I get is big black square on my screen, I don't see how that's going to be useful. Unless I'm doing something wrong? Based on the example from the wiki (I really have no idea what I'm doing here): addEventHandler("onClientResourceStart", resourceRoot, function() drawArea = dxCreateRenderTarget(800,700) end ) addEventHandler( "onClientRender", root, function() if drawArea then dxSetRenderTarget( drawArea ) dxDrawText("This is the title of the song", 415, 790, 871, 837, tocolor(235, 133, 23, 255), 1.50, "pricedown", "left", "top", true, false, false, false, false) dxSetRenderTarget() dxDrawImage( 415, 790, 871, 837, drawArea ) -- ? end end )
  23. Hello, Does anyone here have some experience with moving text, in particular like in the image above? I have some issues with this. First let me tell you what I did to achieve the above. To create this effect, I'm using string.sub() along with some other code to put the first letter behind the last and a timer to keep doing it. There's just one issue, though. It's all very choppy and I need something much smoother. So, I was wondering if anyone here knows a way to achieve that, preferably with dxDrawText. I've been thinking about ways but I just can't come up with anything good. One way I thought of was to change the position of the text until it gets to a certain point then delete it and create a new one (or put it back) at the starting point. But then what about what's between the end and the beginning? It could potentially work but it shouldn't go all the way across the screen and disappear into nothingness, it needs to scroll in this certain area only. If only there was a way to hide/cover a part of the text. If you have any ideas, please share them with me. Anything would be helpful. Tails
  24. If you mean offline, then of course. But who wouldn't prefer that site's layout with the thumbnails and stuff, over the default in-game object browser? I know I would.
×
×
  • Create New...