Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. thePlayer is not defined. As for the exported function, I have absolutely no idea what that does
  2. That looks like a custom system. You'd want to use onClientDebugMessage as previously mentioned for that.
  3. Ehm, yes you can change the colour of it quite easily. Use outputDebugString and set the message type to 0, meaning custom. After that you can specify the RGB values as you please.
  4. Got ya, but the text looks rather peculiar as well, specifically the text that was inherited from a button. Almost as if it has a green-ish outline? Or maybe I'm starting to get old and my eyes starting to betray me
  5. Looks interesting, I've also been working on my own element-based DXGUI for a little while now, but it's rather tedious and boring - I much prefer to work on other things. So this would be a welcome addition. One thing though is that something about it feels... pixel-y? If that makes sense, which it probably doesn't - but it might just be the screenshots being low quality? Personally I'm a bit reluctant to using compiled resources as I'm the kind of guy that want the highest possible control and security on my server, so I'll check it out once open source is publicly available. Keep up the good work!
  6. Could you share us a bit more of your script? Like how the edits are defined, etc.
  7. Did you by chance forget to add GUIEditor.edit[1]?
  8. getPedOccupiedVehicle returns the vehicle element or false - not the seat. To get the seat you need to use getPedOccupiedVehicleSeat. Also, you're not using bindKey properly. You're using the client-sided version which returns the key pressed and then the state. So in this case, thePlayer would return "o" and seat would return "down" or "up".
  9. Dealman

    Help

    If an element data does not exist, it returns false. False is a boolean value, so with most likeliness the element data "missionz" is not set properly(or simply does not exist). Unless you post the relevant code as to how it is set, we can't really help you further.
  10. Dealman

    NFS:SA

    Little did I know the shaders page actually had an example of exactly what you need. The one you should be taking a look at it is called "UV Scripted". I went ahead and threw together a small example for you. You can download it here. Do bare in mind that this is very basic and is merely to give you an idea as to how it would work. Usage is simple, start the resource, get in a car and type /apply. Use F3 to toggle cursor on/off. I will be playing around with this later myself once I've had some sleep, I'll have to figure out how to disable the tiling and that stuff. Edit: Good lord is this website being slow today or what D:
  11. Dealman

    NFS:SA

    I already know how to apply a decal to a car, what I don't know is how to dynamically change its relative position, scale and rotation. We need to use dxSetShaderValue for this. It's the actual shader scripting I don't quite know how it works - I'm trying to do some research at the moment - but I'm tired so we'll see.
  12. Dealman

    NFS:SA

    You'll have to use shaders. I'm quite curious about making something like this myself as I'm working on my server again. I don't think there's too many around this forum that know how to work with HLSL shaders, I've tried some in the past but I think I'd have better success with rocket science. But to name a few you have @Ren_712 and @Sam@ke. Ren has helped me a fair bit in the past, so if you contact him(or he sees this) he might be able to offer some more input as to how it works. Meanwhile, I'd suggest you do some research about how HLSL shaders work - look up some simple examples and play around with them.
  13. Given that predefined variables are just that; predefined, they'll use less resources. However, the difference is likely to be so small that it won't make any difference whatsoever.
  14. Dealman

    admin tag issue

    Use debugscript. type == 0 isn't defined, did you mean msgtype? Also you only need to cancel the event once.
  15. I just tried it as well, it didn't work for me either - so I tried moving the inside marker up by 1 unit and after that it was working. Weird
  16. Have you tried moving the marker a bit? For example try and move it up a little bit? Or to the left/right, maybe it's in some awkward position where it can't register the event.
  17. Have you tried to use setElementInterior on the marker? So it's within the same interior as the player?
  18. Do you mean to an XML? SQL is a database...
  19. You have to keep in mind providing help on these forums is something we do on our spare time - for free. You make the thread and patiently wait like everyone else, you're not entitled to us helping you. Either way, the problem is with name= tostring(data["accountname"]) as it is returning "left". Since we can't see how you're populating it, we can't really help you. Also, the MySQL module is obsolete. MTA now has native support for MySQL, you might want to use those functions instead.
  20. You need to use setElementDimension for that. Also you can put them in the same function, just use an elseif statement like this; function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1210.48621, 2358.32373, 8.01253 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The Arabian Server") elseif(source == GUIEditor.button[2]) then local teleportX, teleportY, teleportZ = 1923.0625, -1760.005859375, 13.546875 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The English Server") end end addEventHandler("onClientGUIClick", root, teleportPlayer)
  21. My advice would be that you get the guieditor and use that. It will visualize the bounding box for you and generate the relevant code. Keep in mind the alignment is relative to the bounding box.
  22. As far as I'm aware you can not rotate the wheels by using setVehicleHandling. I would believe the wheels are managed by the engine and as such you can't really modify them. Maybe this is something that could be added as a feature request, I'm guessing it should be possible since the water riding cheat modifies the wheel rotation.
  23. Yeah it should possible,try and use getWorldFromScreenPosition and processLineOfSight. This will give you the world co-ordinate, you then need to convert this to a relative value. So subtract the vehicle's position from the X, Y and Z co-ordinates you got from the previous functions to make it relative.
  24. The bounding box for your dxDrawText is too small, so when you try and center it and will be offset like that. You don't specify width and height like you do with dxDrawRectangle, instead you specify the position of the bottom. Edit: To clarify, let's say your text starts at 300, 300 and you want the bounding box to be 400 pixels wide and 300 pixels "high". It would look like this; dxDrawText("Text", 300, 300, 700, 600) Whereas a rectangle would look like this; dxDrawRectangle(300, 300, 400, 300)
  25. You'll probably want to save the data to a text file rather than XML, since for optimal results you would record the vehicle's data with every frame - using setTimer you're limited to a minimum of delay of 50ms which will look rather choppy. XML is pretty slow compared, so I'd stick with good old fileRead. I was working on a kill cam about 2 years ago, it's far from finished and not optimized - but you can use it for inspiration if you'd like. It's dependent on the race resource, so make sure you have it running. Meta.xml Server.lua Client.lua And as I said, this code is from 2 years ago - it's nowhere near complete and not at all optimized and is merely to serve as a test. How to use; 1. Make a new resource and add the above files. 2. Make sure "race" is running. 3. Start the resource you just made. 4. Start a new map(the script will start recording when a new map has started) 5. It will record for 15 seconds, after 15 seconds have passed - type /startreplay to watch the replay.
×
×
  • Create New...