-
Posts
123 -
Joined
-
Last visited
-
Days Won
4
Everything posted by ReZurrecti0n
-
Absolute/Relative GUI/DX Resolution Scale Positioning
ReZurrecti0n replied to ReZurrecti0n's topic in Scripting
I apologize IIYAMA because two wrongs never make a right, I've let anger get the best of me. You mentioned you were very busy and most likely already frustrated with something else and so was I especially when it comes to math. Seems we were both vulnerable to anger more than usual. The trigger for me was "Lazy" and my response to it was no better... I've mistaken the link you sent and failed to notice it was to a reply on the thread, so I clicked the thread headline link instead which of course directed me to the OP of the thread. I read and seen it was for scaling and did continue down the page to read the replies. If I had not mistaken the link in the first place, then I would have payed more attention to the reply you directed me to and would've noticed it sooner that it was indeed about positioning. Anyway, now after reading that reply with closer attention, it's all coming together slowly and I'm finally grasping the idea of how to position/scale correctly to fit all resolutions. This math is not my strong suit, will take me time, but am likely to understand it soon. I don't just want to copy and paste code, but also learn what makes that code work etc. And that tutorial will surely teach me, just took me a bit of time before realizing it. I do appreciate the time and effort you sacrifice to help those in need. It'll likely take me another day of "studying" that tutorial, but will keep everyone updated with the new results... (Actually make take me longer because I think I need a few days break from coding in general after tonight's episode) -
Absolute/Relative GUI/DX Resolution Scale Positioning
ReZurrecti0n replied to ReZurrecti0n's topic in Scripting
This is why I don't like posting threads for help and why I'm rarely heard from... I read the OP on that thread, then went down the first page of replies as well. Yes, maybe the answer does lie within somewhere, I'm just not grasping it Truth of the matter is, I'm tired of wasting so many hours on something for other people's entertainment (The Players) Don't worry about it, if I don't figure it out on my own, I'll find some work around. Either that or just give up the entire project altogether, not like I'm getting paid for this anyway Feel free to lock the topic if you want to -
Absolute/Relative GUI/DX Resolution Scale Positioning
ReZurrecti0n replied to ReZurrecti0n's topic in Scripting
I remember the 300 and 50 from somewhere and was able to create the button centered on the screen regardless of screen resolution and it also appeared to change to the right size as well (To cover up that "Say" text perfectly), just couldn't figure out how to position it on the screen. Of course adding pixels to the X and Y won't work, but maybe by adding/subtracting using relative values instead? But I do know that using relative values alone instead do not work either. Actually, should have included that in the code I posted, will update it: (NM, can't seem to edit the OP for some reason, but listed below anyway) (0.0141,0.1630,0.0120,0.0130) Relative Values for the GUI Button -
Actually, the first thing I attempted to do was disable the 'T' and 'Y' keys, but was unsuccessful (Just now thought of unbinding the keys). Anyway, IF I was able to disable the input for chat by disabling those keys, then I could create a new GUI Input to handle the chatbox. But even if successful in that, would still need to put that GUI precisely under the chat box where the "Say:" would appear when you normally hit the 'T' key for all resolutions. So... I've decided to place a button over the "Say" text which this button will represent the mode to output the chat message as. For example, it's a small button with only enough room for 1 letter and if that button's letter were G, it would stand for global and anything sent to the chat would remain global. Click on that button and it would change the letter to L which would be for local chat. If you better understand what I'm trying to build, you'll understand the problem more I'm currently having. Now the problem is that I can create that button to cover that "Say" text when you press the 'T' key in a 1920x1080 resolution, but changing that resolution will result in that button no longer covering that "SAY". I've been at this for days and gone through at least 15 threads about it and not to mention the wiki itself. All the formulas found don't work when it comes to keeping that "Say" covered up by the button as the button doesn't position correctly. Now is the time I finally ask for help in resolving it: How do I keep that GUI Button covering that "Say" text on all resolutions? I suspect it will involve some scaling math to it... (The following code is what I currently have and does not keep that button covering the "Say" text except of course in the 1920x1080 resolution where it was created) local SW,SH=guiGetScreenSize() function onClientKey(button,state) if(button=="t")then-- T Key if(state)then-- Pressed local t1,t2,t3,t4=RelativePosition("ScaleGUI",27,176,23,14) ChatButton=guiCreateButton(t1,t2,t3,t4,"G",false) guiSetFont(ChatButton,"default-bold-small") end collectgarbage() end function RelativePosition(method,xposition,yposition,width,height) if(method=="ScaleGUI")then local f1,f2,f3,f4=(xposition/1920)*SW,(yposition/1080)*SH,(width/1920)*SW,(height/1080)*SH return f1,f2,f3,f4 end collectgarbage() end
-
Everyone is experiencing this issue when the SQLite3 Database is closing, this isn't some install problem. Besides, I get this issue with 1.3.1, not sure if I would with 1.3 or not though. Another note is that my computer has been wiped clean recently (About 2 weeks ago) and completely restored with fresh installs of everything. This is likely just a small overlook (Everyone makes mistakes) that is probably being fixed for the next release, I only just wanted to provide a little more detail in case it does actually help the dev team, not at all some complaint or something as stupid as that, lol. MTA:SA Devs are very professional in what they do, I have complete faith in them
-
1.3.1 Win XP Pro (32 Bit) Also, if I just terminate by clicking the X Button, it hangs until that End Now option appears etc. Don't know anything about Dump Details (Just thought I'd post a little extra details about it)
-
Thank you robhol, appreciated
-
I just wanted to know if MTA currently supports this feature or not... Is there anyway to enable Auto Aim on a MTA Server?
-
I use Notepad++ as I know of no other program to script for Lua (Judging by the amount of votes so far, seems I've chosen the correct program to use too)
-
Just browse through the other servers and try another...
-
Well all I can really tell you is that I doubt very much it's because your CD is scratched, Sync is more likely the cause...
-
Multiple Same Commands Question [RESOLVED]
ReZurrecti0n replied to ReZurrecti0n's topic in Scripting
Thank you Solid Snake 14, I appreciate the response... I'll give it a shot at my next chance Update: Works like a charm, thanx again -
You can still map SA-MP with MTA, there's even a converter out there for that. Most of the SA-MP Community probably uses MTA Map Editor for mapping, just tells me how well MTA is well ograngized compared to SA-MP. If not for that, I might not even knew MTA existed, but I do highly recommend switching from SA-MP to MTA if that is the case here... As for the requested Object IDs: Try searching using keywords like Rail, Velvet, Rope, etc.
-
This seems to depend on if you're changing a client side script because now that I'm done with the client side and working in another area, it loads properly with the first attempt... (Won't know for certain until I progress a little further in though)
-
Multiple Same Commands Question [RESOLVED]
ReZurrecti0n replied to ReZurrecti0n's topic in Scripting
Yea I didn't think it was possible, thanx for the response -
I don't even think this is actually possible, but it's worth a shot anyway: I have a /Test1 command and then a /Test2 command that will perform the same exact function but instead of doing something like this: addCommandHandler("Test1",TestFunction) addCommandHandler("Test2",TestFunction) Is there a way of merging them together? Such as... addCommandHandler("Test1" or "Test2",TestFunction)
-
Not sure I completely understand what you're saying, but when you say it looks like lag then I think I experienced the same problem. The screen just freezes for few minutes which in some cases over 5 minutes and I end up manually disconnecting. Sometimes I'll see this, but it's rather rare: ***Network Trouble*** Otherwise, are you certain the problem isn't the server script itself? If you're teleporting over great distances for example for no real reason, my first impression would be the server's script is bugged or whatever. Either way, I don't know of anyway to fix these issues (Freezes/Lag) as I'm still new to MTA myself...
-
SGC:RPG Live Support Script(Tell me what you think)
ReZurrecti0n replied to Razerclaus's question in Client
Check it out, this is what I'm currently working on, but at times I wish would've just made it alot more simple because the amount of time it's taking to complete (Just about done though, but still). This is much more complex than it appears, yet I think it'll still be very rewarding in the end. However, focusing more on actual gameplay first should be anyone's first move when it comes to designing a game server. Another words, a very simple Military, Cop or Civilian would have done just fine for a start, but I have this problem with going all out on even the simplest of things. Your script is still impressive to me, but most players will tell you what they've told you here, it's all about gameplay. But yea it's nice to have a live support feature although announcing it just makes it look like you're just trying to grab attention etc. It's a nice addition (Live Support), but take these player's advice and focus mostly on actual gameplay, then you can worry about all those neat little features... (So you can announce everything at once with much more appeal) -
Nearly everytime I start my server (Whether in the client or the server itself), I must reconnect once more before it loads up correctly. This is not an issue if I were to visit someone else's server though, just my own server. I noticed that I download the resources or whatever on every first attempt, but when I reconnect it doesn't re-download. Is this possibly the reason I connect properly on my second attempt maybe? Has anyone else ever had a similar issue? Is there a way around this so I may properly connect right with the first attempt or is this just something everyone goes through? EDIT: What about compiling before starting the server if that's even possible (Using Notepad++)
-
I've resolved my concerns with SetElementData (Server/Client) My quote above is what I'm still having issues with...
-
I've been away for a bit of time, my apologizies... My first attempt with connecting to my local server was successful, but it is actually quite rare. I must still connect 2 times before my game client works properly. It doesn't matter if I host from the game client or start the server seperately, this still occurs. But now I know its a connection issue, not a start up problem Running MTA 1.3 with Windows XP Has anyone experienced this before or knows how to resolve this issue? It's rather annoying having to start, wait, then restart before it loads correctly each time for whats suppose to be quick testing...
-
I don't know LuA, but started at the wiki which I'm grasping the basic concept... Alot of forum searching and even a little bit of internet searching helped me out. Just a few weeks out and already able to create simple lUa scripts because of this type of research (Wiki/Forum/Web). It's going to take effort on your part if you truly what to learn lUA...
-
Thank you again, this seems to resolve that issue (Loads correctly on my first connection attempt this way)
-
Thank you, this works out perfectly even for my first example. Now with this resolved, I can finally move forward... There is still my first concern though, when I launch MTA and choose 'Host Game' to start a local server used to test scripts I'm currently working on, it freezes or just doesn't load up the server correctly the first time. But when I go back to the main menu after it fails the first time and repeat those same steps, it loads successfully. Can anyone explain this? Perphaps the scripts are compiled with the first attempt creating a cache although it fails to loads correctly, then the second time around it works because its cached or something? Is there a way around this though? It's rather annoying having to load the server two times when I need to test my scripts...
-
... yes you can. All element data in synced by default, unless the fourth argument is set to false. It is very important to note what sort of data needs to be synced. In general, element data should be used for syncing data about an element (it can be used for many thing, but this is just a general rule). Also, element data propagates down the element tree - if you call setElementData(root, "cupSize", "DD"), then getElementData(element, "cupSize", true) will always return "DD", as getElementData will move up the element tree until it finds a value for "cupSize". If you set the last argument of getElementData to false, it will not propagate up the element tree, therefore returning false. In my first example using this method, it still returns false regardless (The client doesn't seem to acknowledge the data) But in my second example using this method, it returns 100 as it should using getElementData(root,"Test",true) However, the 2nd time around (When the gui button is clicked), it doesn't return 100 (my script crashes on the output) In conclusion: It doesn't matter if I use that extra argument (true) or not in the function, I still get the same results