Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. Sorry for the delay, working on quite too many projects at the moment. I'll look into making a tutorial for DX drawn HUD components soon. Does anyone want any specific HUD element?
  2. I'm confused, why are you subtracting 1280 with 1540? That'll be a negative value... Here's an example of how I make it look the same on all resolutions. Do note that there are more advanced techniques that may yield better results. 50p is probably the guy you'll want to talk with about that dxDrawImage(screenX*(1007/1360), screenY*(5/768), screenX*(150/1360), screenY*(150/768), "Images/Profile.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) 1360 and 768 being the native resolution. That meaning, the resolution the GUI was designed on.
  3. 1.3.4 is not 1.4... It's not officially released yet, I've no idea why the developers think it's a good idea to delay it all the way to 1.4. You can however download this resource. Basically does the same thing.
  4. Of course it's not working when the function wants X, Y, Width and Height to be a float value, but you're making it a string. I suggest you look up some basic LUA tutorials to learn the difference between Integer, Float and Strings. Things you did wrong; • Named your function the same as the dxDrawText. They will conflict with eachother. • You tried to make a variable called "createdxDrawText" containing multiple arguments. • You provided the X, Y and Z coordinates as a string, it needs to be a float value. No Z value needed. (Keep in mind that providing ingame X, Y and Z coordinates will not make it look like it's being displayed inside the world itself.) • You made a typo, addEventHandler • 3rd argument in bindKey has to be the function it's attached to, you gave it a string. • Tried to use onResourceStart which is server-side. Doesn't work client-side. Use onClientResourceStart. • You used getRootElement() instead of resourceRoot, meaning the code will trigger everytime ANY resource is started. resourceRoot means it will only trigger when that specific resource is started. • You never used onClientRender or onClientPreRender, text would only draw for 1 frame. • You never closed the function with end. • Some more errors... Example of fixed code; local screenWidth, screenHeight = guiGetScreenSize() local isBeingDrawn = false function startDrawingOnStart_Handler() if(isBeingDrawn == false) then -- Make an if statement to change the variable when the function is triggered. addEventHandler("onClientPreRender", root, textToDraw_Handler) -- Add the Event Handler to draw the text for each frame. isBeingDrawn = true else removeEventHandler("onClientPreRender", root, textToDraw_Handler) -- Remove the Event Handler. isBeingDrawn = false end -- Close the if statement. end --addEventHandler("onClientResourceStart", resourceRoot, startDrawingOnStart_Handler) Uncomment this if you want it to draw as the resource is started. bindKey("F11", "down", startDrawingOnStart_Handler) function textToDraw_Handler() dxDrawText("Some text here", 392, 251, 954, 319, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, true, false, false) -- Text Shadow dxDrawText("Some text here", 391, 250, 953, 318, tocolor(127, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, true, false, false) -- Text Coloured end
  5. Use debugscript. Also this is wrong; addEventHandler(''onClinetMarkerHit'', Make it; addEventHandler("onClinetMarkerHit",
  6. I even tried to search Thanks mate
  7. Working on getting some of my resources to write logs when a player does a specific action. So far I've accomplishes all I want, the only issue I have is that I can't seem to find a way to move the position to a new line. Thus it becomes a complete mess to read. Does anyone know how to make it write on a new line? It's a text file so I understand that it doesn't have any 'true lines'(or does it...?). I've tried \n, which doesn't do anything.
  8. Not entirely sure, other games utilize a mechanic called lag compensation, but I see that as a game-breaker in all honesty since it's very hard to balance. Might be some other workarounds
  9. I don't see what's wrong, could you be a bit more specific? I'm not a DM player, so I'm not entirely sure as to what you're referring
  10. I'm not even sure what you're asking for... Do you mean the bloody screen, so real? Or hit markers...?
  11. If you know the functions, then try to make it instead of expecting it to be served on silver platter. If you're having trouble, post the code you've got and we'll try to help from there. There are various ways to achieve this.
  12. triggerClientEvent triggerServerEvent You use those to transfer data between client(s) and the server.
  13. ...And what is the problem?
  14. Good suggestion! I won't be making the Job tutorial too soon since I'm occupied with work as well as working on my Streamster at the moment. HUD Components shouldn't be too hard. I assume you mean DX Drawings, yeah?
  15. Yeah, you can change the chart type by editing the script itself. chartChartType = guiCreateEdit(0.02, 0.30, 0.46, 0.09, "p3", true, chartMainWindow) guiEditSetReadOnly(chartChartType, true) You can either change the string or remove the read only function. I've been working on a new GUI for it which allows for a little more customizing, including transparent backgrounds. However, it's not a high priority of mine
  16. Sorry for the late reply, As far as I know the MTA config file does not actually contain the resolution. I am not entirely sure where it's saved in all honesty. But I would guess it's the GTA's settings file itself. Which seems to be compiled. The file's in Documents/GTA San Andreas User Files/gta_sa.set. Edit: You can try this SET Editor to change the settings, if needed.
  17. If it passed the if statement, it wouldn't trigger whatever code is after else... Maybe outputChatBox retrieves the text of the item automatically...?
  18. Post us the server-side Script. Fair enough, missed that part. But I still fail to see why server-side code matters? It never succeeds to trigger the event, the if statement fails - thus it always outputs the message. Server-side code should not matter.
  19. That only returns the selected index of the ComboBox. guiComboBoxGetItemText gets the text of an item. Make it; local theItem = guiComboBoxGetSelected(cbmVeh2) local theText = guiComboBoxGetItemText(cbmVeh2, theItem)
  20. onClientRender is triggered with every frame, you'll be making 30-60 images per second. Use dxDrawImage or dxDrawImageSection. If you wanna use GUI instead, create the image as the player is spawned or joins the server. Then use onClientPlayerDamage to update it.
  21. Dealman

    Excel in MTA

    Of course! This part of the URL is what defines the Chart Type; cht=p3 The different types I managed to find; p = 2D Pie Chart p3 = 3D Pie Chart bvs = Bars, I assume it stands for Bars Vertical Solid v = Venn Diagram lc = Lines with Axes lc:nda = Lines without Axes Edit: If you mean that exact chart you linked, then the answer is no. This URL based Chart API has been deprecated by Google and is no longer used. I'm afraid their current API would be quite the hassle to integrate into MTA
  22. Dealman

    Excel in MTA

    Indeed it is, just add this to the URL; chf=bg,s,00000000
  23. Dealman

    Excel in MTA

    You can download the image using fetchRemote, it's what the GUI does. I was working on a new GUI that allows you to select all of their different styles, 2D/3D Pie Chart, Bars Vertical Solid, Venn Diagram and Line Charts. I however decided to stop the work on it, since there's so many values you can fiddle around with to tailor it the way you want, a GUI to cover it all simply isn't feasible. I might still make one for the most simple things, but it's not a high priority at the moment. If you give me some information on what you want, I'll see if I can make a chart for you since I am fairly acquainted with their API now.
  24. Dealman

    Excel in MTA

    I made a quick little GUI for the Google Charts API mentioned by csmit195 above. Do take note that it uses a very basic URL based API. And is nothing over the top. Visit my thread if you want to download it. Thanks csmit195, for mentioning the API! Note: Resource needs permission to use fetchRemote. Remember to add it to the ACL.
  25. Released a little GUI for making some very basic charts using the Google Charts API. Credits go to csmit195 for mentioning the API in another thread! Note: Resource needs permission to use fetchRemote. Remember to add it to the ACL. Edit: I'm also currently in the process of re-writing the Streamster from scratch. So far it's coming along pretty nicely. The design is still a work in progress, especially the Queue tab. Sreenshot 1: Link Screenshot 2: Link
×
×
  • Create New...