Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. You can do it like this; local namedRed, nameGreen, nameBlue = getPlayerNametagColor(thePlayer) Then use the variables along with guiLabelSetColor. guiLabelSetColor(labelVariable, nameRed, nameGreen, nameBlue) And you can then use this to get rid of the HEX Colour Code from the names; :gsub("#%x%x%x%x%x%x","")
  2. Dealman

    Medics Chat

    Replace uzenet with ..., so it looks like this; function mentos_chat(jatekos, parancs, ...) Then you simply add this; local message = table.concat({...}, " ") This way it won't break when there's a space.
  3. Basically, whenever one of your commands with a prefix of "!" is entered, depending on which - a sound should be played. If the player tries to do another command under 15 seconds, only the text will be output - no sound, is this what you want?
  4. They could be custom variables, for example; local accName = getAccountName(getPlayerAccount(source)) local isAdmin = isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) Then you could use it like this; function whatever() if(isAdmin == true) then --whatever end
  5. So do you want to draw the Shader onto a DX Window like a preview? Or do you just want to be able to toggle the shader on/off through a DX Window or what? It would be easier to help if you explained what you actually want to do
  6. Do you mean interpolateBetween to make it look like it's drawing your DXWindow? Or do you mean a way to preview shaders or something?
  7. You'll just have to be patient and wait for someone to answer, I'd love to help you out but I have no experience working with Peds. Best I could do would be to re-direct you to the MTA Wiki and look for ped related functions.
  8. Dealman

    Question

    Before making questions like this, try to look at the MTA Wiki. Think of things like this; You need a way to see when a vehicle is destroyed, so what you need is an event. Head over to the MTA Wiki, look at Client Events - and then what you need. Right now, you need to look at Vehicle Events. In there you'll find onClientVehicleExplode which might be what you need. (onVehicleExplode for server-side) The Wiki is your best friend
  9. Dealman

    I cant do this?

    Would help if you posted what error and/or warnings you are getting.
  10. You'll need to use setCameraMatrix to change the camera's position and target.
  11. Can't really help you, but in all honesty, the darker one looks much better. The brighter one looks so unnaturally bright
  12. Did you get it to work? I just wrote this up a bit fast, I've never worked with Peds before so it might or might not work Also I got rid of the killPed part since the event is triggered when the ped is killed, I don't see a reason to kill what's already been killed
  13. There is, onClientPedWasted. Whenever in doubt, always refer to the MTA Wiki since it for the most part has very thorough examples and explanations of how every(most) functions and events work. Also, you'll need to use setElementHealth, not getElementHealth.
  14. Any resource trying to access aclReload requires admin permissions. Runcode does not have any permissions by default as far as I know, try adding it to the ACL and then restart your server.
  15. Try this instead; playSound ('n'..tostring(count)..'.mp3');
  16. dxDrawText will only draw for one frame, you need to assign onClientRender or onClientPreRender for it to render every frame. The reason it's not working is because of this; Instead, make it like this. And remember to remove the addEvent and addEventHandler from the EnterAreaSrv and ExitAreaSrv functions!
  17. I've tried to search on the forums as well to look at the MTA Community for a tool to make life easier when placing race spawns. But I couldn't find anything... Does anyone know of a resource that can help to speed up the process of placing spawnpoints? What I need is something that can for example clone X number of spawnpoints and for example move them along the X Axis with an offset of 20 added for every spawnpoint. Something else would be the ability to select multiple spawnpoints to move them all at once, as far as I know Multi-Select Tool doesn't support this...
  18. Alright, any ideas on what to try? I've absolutely no idea... I doubt account data would work, would it?
  19. I've looked around on the forums to see if anyone had tried to change the limit of characters you can have in a chat message and your nickname. I didn't manage to find anything useful by searching so I would assume this is hardcoded in some way into MTA itself and can't be changed? Or does someone know of a workaround to increase those limits? I also tried looking for a resource which would do this but couldn't find anything there either... Any pointers regarding this would be greatly appreciated!
  20. Good man Castillo keeping the streets clean @Shadex: My best advice to you would be to start with something simple and then work your way up from there. If you have people showing you how to do, you won't learn much - at least I didn't. I felt that I learn much easier if I try to do it myself first and then ask for help if I can't go any further. That's the reason this forum exist, to help people out. Try to think of something easy to start out with. Personally I started out with the interest of creating a script to make streaming of music easier and more fun. First it started out being only client-side, and I focused on features such as Playing, Pausing, Stopping and such things. And by doing this, I got good experience with how the GUI works in MTA and how to set up the logic behind it for it to work. I then had to made it server-side, so I had to use things like triggerServerEvent and triggerClientEvent. And this part was really hard for me to understand, but once I got it to actually work and did it a few times - it only makes sense and actually is rather easy. This comes from one who had no experience in scripting at all but managed to create a script for streaming with a fully functional dynamic library for adding, editing and deleting songs. All you need is the MTA Wiki and Debugscript 3. And then the occasional MTA Forums for when you are really stuck on something. Good luck, it's always nice to see people take interest in the ways of scripting ^^
  21. No, he said he had stopped working on it for a while since he had been away from the MTA Community. He said he would be back working on it this summer and improve the Wiki. I'm highly anticipated to see more work being done on it since I already know how it works, just needs more functions. Besides, I never said I didn't like it - I love dxGUI and have used it quite a bit, it just needs more functions before it can truly be used for something.
  22. Most people seem to use Lighter Dark, and for me the default style was selected by default - so I was stuck with it for weeks and even months before I even knew Lighter Dark existed. Go to Settings and try to change to Lighter Dark, see if you like it more. I too want to create my own themes, but we need to wait for some resource for that, for example; [WIP] User Interface System for Multi Theft Auto by Cadu12 He seems to have stopped working on this. [https://forum.multitheftauto.com/viewtopic.php?f=108&t=43639]dxGUI[/url] by Laserlaser This one works but is lacking a lot of important features such as Gridlists and Panels.
  23. If you don't know how to use triggerServerEvent, then yes it's hard. @OP: You'll need to create a new event server-side using addEvent and addEventHandler. Then trigger this event via the client-side script with triggerServerEvent.
  24. It happens sometimes if you have the same thread open in different tabs or whatever, I've done the same mistake myself a few times. @OP: This is what checks if you're on the ground, and if you are you can jump - otherwise not. if (isVehicleOnGround( vehicle ) == true) then local sx,sy,sz = getElementVelocity ( vehicle ) setElementVelocity( vehicle ,sx, sy, sz+0.35 ) end
  25. No need to make it over-the-top with tables when you could just use onClientMouseLeave to return the Alpha to 1 :3
×
×
  • Create New...