Dealman
Members-
Posts
1,421 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Dealman
-
Would help if you'd give some more detail as to what you're actually asking for. What kind of Spawn Menu? Player spawning? Vehicle spawning? What else does it need? Also what do you mean by "easily modified", unless you know how to set it up yourself I sincerely doubt it could be made easy to modify, unless a lot of local variables are used so you'd only have the edit their values...
-
It would also appear that muting does not work as intended. If I mute another player, the player becomes automatically unmuted after a few seconds. However, I can still unmute him even though he already has the ability to talk. Anyone else having this issue?
-
Any updates? Been looking for such a resource, but they're either outdated or lacking vital parts of a GUI. This is looking amazing so far!
-
Thank you guys, finally got it all to work!
-
Yeah but the thing is, when I do that and get the offsets for the rectangles - they don't follow the GUI if I move it around. I'm assuming I need to have guiGetPosition inside the onClientRender event so it constantly gets the position, or am I wrong about this?
-
Agh, completely missed that one... Thanks a lot 50p! Any suggestions as to how to go about to make the Rectangles follow the GUI? I tried to use guiGetPosition but whenever I used that to get the X and Y Coordinates of the given GUI Element, the rectangles would always be drawn in the top left corner. So I had to fiddle around with the offset quite a bit to get them into the right position... I'm not very good when it comes to math since I'm not even good at programming to begin with, some pointers in the right direction would greatly help me
-
Am already using this function, but the problem is I don't know how to make it recognize the when tab is actually selected. I am using onClientGUIClick, but I can't figure out what to use as source. If I have the Window or the Tab itself it only recognize it if the window is clicked or somewhere on the tab. Not the actual tab button thing itself, which is that I need. I tried using guiGetPosition but it still doesn't work, if I move the window around the rectangles remain at their default location.
-
I'm working on a GUI for a script I made where you can set various settings but I'm having some issues with it, I have the colorpicker script which works just as per usual and it's all working as I want it. The problem is that I want to draw 2 DirectX Rectangles for each tab to represent a preview of the current colour that is selected. I don't know how to make it so those Rectangles follow the GUI. Also I'm trying to find a way to have the script recognize when a tab is changed, but I can't get it to work properly - I'm not sure as to what to have the source set to. Currently I have this code; Which isn't working, I've tried various sources but can't find anything that works. Would I have to get the element type or something and go from there? Example of what I'm trying to achieve; Don't mind the 2 rectangles to the right, I simply had them positioned there to make sure that they were getting the colour properly. What I want to do here is have the Rectangles follow the GUI if you move it around as well as stop rendering the rectangles depending on which tab is currently selected. I know that I have to use addEventHandler and removeEventHandler. So far for this I have only managed to get it to work when the GUI is shown/closed, I don't know how to do it for the separate tabs. Currently this code for this looks like this; dxDrawImage Issue The other thing I'm having problems with is to draw a image next to a player's nametag, while I've managed to accomplish this by editing nametags.lua inside the Race Resource. But the drawn image is acting weirdly the further away you get from the other player. This is what it looks like; Would it be possible to make it resize along with the nametag? The idea behind this is to be able to assign certain "Medals/Trophies" to specific players. The code is very basic; dxDrawImage(sx+80, sy-10, 26, 26, "img/bronze.png") If anyone could help share some light regarding either of this it would be greatly appreciated. I'm not very experienced in programming so I'm having a hard time to come up with the logic for the script
-
So as of lately I've been playing around with DXGui for a while, and I absolutely love the looks of it, however, it's missing some of the elements needed to make a truly useful GUI, such as EditFields and GridLists. However, I stumbled upon a picture of some kind of Vehicle Spawner script(Believe it was done by the one and only Solidsnake14), which was using DXGui but had regular GUI elements attached to it and I then managed to find this; guiAttachToDirectX However, I haven't been able to make use of it, I always seem to mess it up. I managed to get it to return no error or warnings, but the GUI Element still didn't show up. Does anyone have any example of how to properly use this function?
-
As Pain mentioned, you'll have to use guiGetText to fetch the text from the EditField, for example; fetchHexColour = guiGetText(GUIEditor.edit[1]) Now the colour code has been fetched by guiGetText and stored in a variable, "fetchHexColour". Now you'd have to trigger a server-event and pass this variable along with it. First you'll have to create the actual event, and then have it triggered by a client. For example; server.lua: function onClientSetColour_Server_Handler(fetchHexColour) if(fetchHexColour ~= nil) then playerNameTag = getPlayerNametagText(source) --Source is the client that triggered the event. hR, hG, hB = getColorFromString(fetchHexColour) -- Have to convert Hex to RGBA to set the colour. hexRed etc... SetPlayerNametagColor(source, hR, hG, hB) else outputChatBox("Error: Nothing was entered!", client, 255, 0, 0) end end addEvent("onClientSetColour", true) addEventHandler("onClientSetColour", getRootElement(), onClientSetColour_Server_Handler) Then have the above event triggered by the client; client.lua: triggerServerEvent("onClientSetColour", getLocalPlayer(), fetchHexColour) I'd also suggest you rename the GUI variables to make life easier. The code above might not work, it was written out of memory of things I've used before... Hopefully it will ;P
-
Okay so as of lately, lately being the last week, my MTA has started to behave very weirdly. Now for some reason if I play MTA for about 30 minutes to an hour, all of a sudden the downloading of maps and whatnot will become ridiculously slow, as slow as around probably 0.5-2kb/s and it stays like this for about half an hour as well, sometimes less. I've tried everything I can come up with, rebooting the router, flushing the DNS, trying to use OpenDNS instead, restarting the actual modem, tried plugging it directly to the modem without any router but nothing works. Even tried to run in DMZ mode to see if that helped, still nothing. Ports are forwarded and I also tried reinstalling MTA and GTA SA. What blows my mind though is that the MTA Forums also become ridiculously slow but only when MTA is slow as well, everything else works perfectly fine. Other games and applications which require network access works just fine. Rebooting the PC itself doesn't help either. Computer Specs: CPU: Intel i5 3570k Motherboard: Gigabyte Sniper M3 Rev 1.0 RAM: 16GB DDR3 Router is D-Link DIR-615, and yes, I know, D-Link is the worst of the worst, absolute garbage and the worst possible brand you can possibly get, but I'm not the one that bought it Connection is fiber with 100Mbit down and 50Mbit up. I have tried absolutely everthing I can think of.
-
I believe that Voice is a resource that has been left in the dark corner for a while too long now, I don't think people have realized the true potential of this resource yet. I only recently made a GUI for a "team" I'm part of which is working fairly well, utilizing GridLists for selecting channels, muting and setting other player's channels and whatnot. However, that is one thing. Just one little thing that renders this resource pretty much useless. The volume. I have never encountered a VOIP that has been of such low volume, even at 100% you have to turn down every other sound in MTA and then turn up MTA Sounds to increase the volume further, it would seem MTA Sounds has some kind of multiplier for the voice volume. Voice is an absolutely great resource, it's really fun talking with new players on your server and what not, but not when you have to turn every other sound down and MTA Sounds up thus making the race countdown extremely loud. Other than that the Resource has in my opinion surprisingly good audio quality with some minor stuttering at time, but compared to other games - it's amazing. Just get the volume sorted, that's all it needs.
-
I have to left from MTA last summer. But I will back this summer. I will develop this resource again and improve the wiki page. Great news! This is one of the better resources to make MTA a "prettier" experience as the original GUI stuff looks rather dull. Can't wait to see it back in progress
-
Is this still in development? So far I am really liking the looks of this even though the Wiki Page is really lackluster, I am going by trial and error. Am hoping to see further releases on this as well as a more detailed Wiki Page, this resource is truly amazing
-
I've been trying to draw an image next to the player's nametag(for race) for a while now, but I can't get it to work. And I'm note entirely sure which would be the best/most efficient way to go about with this. So far, I've been working around with textlib.lua and nametags.lua inside the Race resource, and I've been able to change the fonts and whatnot, but I can't get an image drawn next to the name - as soon as I try to add something related to dx to the code, I seem to mess it up in one way or another. Would this be possible to achieve without modifying the race resource? The point of the script is to only draw an image for specific accounts, not everyone. I did some research about this but couldn't find anything that helped me get going, I know I have to fiddle around with dxDrawImage and GetScreenFromWorldPosition. If someone could give some pointers on how to go about with this, it would be greatly appreciated!
-
Am using MetaTags for my streaming script, and it varies. Some streamed mp3s will have MetaTags and some won't. Some have edited their mp3 files to advertise their website through the MetaTags. I would also highly suggest you make a timer between 1.5 - 2 seconds before you try to fetch the MetaTags, this drastically increases the chance of successfully downloading the MetaTags - and thus does not return nil. This applies for sound length as well. It should not be necessary on local files.
-
Thank you, DNL291! Thanks to your example, I managed to come up with this code - which does exactly what I want. The song plays for like a split-second every time a map starts, but I'm sure people can live with that. Should anyone feel the need of such code, feel free to use what I provided above and modify it to your liking.
-
I know how sound works when it's inside the same resource... What leaves me confused is because this music is started by the map itself. And I don't really see any other way to accomplish what I asked here - without the use of onClientSoundStarted which is to be released with 1.4. So I was hoping someone else might have a clever workaround for the time being.
-
Ah, but why would such a useful event be delayed until the release of 1.4...? Hell, I don't really see the use of posting it on the Wiki this early since it would confuse newbies like me Thanks for the heads-up, any ideas if this might be possible to accomplish in some other way?
-
Hello, am working on a script which will keep all map-side music muted, instead of having to mute it every single time a new map is started. I don't know if this is possible, but I thought onClientSoundStarted would be the Event to use for something like this. However, I can't seem to get it to work. I've tried to use the code example given in the Wikipedia, but it doesn't work. The only one that seams to work is onClientSoundStream. Does anyone know if I'm doing anything wrong? And even more so, would something like this even be possible at all? onClientSoundStarted is the only event I can think of which could accomplish something like this. I tried to do some research before posting this, but due to ridiculous limitations to the search I couldn't find anything of use... Any help would be greatly appreciated!
-
Hello, am working on a GUI for the Voice Script and it's going fairly well so far. Have gotten most parts of the GUI working, just having some problems with filling the lists for new players - but should have that sorted soon. The real concern I have is the volume. For some weird reason the voice implemented in MTA is ridiculously low, so low it almost makes it unusable. I was hoping there might be a way to increase the volume, since the Voice Volume inside Settings only go to 100% and still is extremely quiet, you have to up the MTA Sound for it to become louder - but then, other sounds such as the Race Countdown will become way too loud. Does anyone know of a good fix for this?
-
Problem seem to have been fixed now, it would appear that MTA does not work if you have both eVGA Precision and TeamViewer running at the same time.
-
Thanks guys also, does anyone know where the death messages are located? More specifically for Race/DD when someone dies, it's output to the far right of the screen. Am getting rid of the hex tags from the player-names, they're pissing me off...
