Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. This should work, but I might have missed something since I didn't test it. Included an example for several arguments if you'd want that. function testing(cmd, number) --Example: /hi 10 would output "Hi 10" outputChatBox("Hi "..tostring(number), 0, 0, 200, true) end addCommandHandler("hi", testing) -- For Server-Side you might have to add in the source as well, (source, cmd, ...). function testing(cmd, ...) local numbers = table.concat({...}, " ") ArrayString = split(numbers, " ") outputChatBox("Hi "..ArrayString[1].." and "..ArrayString[2], 0, 0, 200, true) --Example: /hi 10 20 would output "Hi 10 and 20" end addCommandHandler("hi", testing)
  2. Radio updated to version 2.3, new download links as well as changelog has been added in the original post. Make sure you read it so you know what's new! Also, I will look into making it so you can move the DX Text Drawings to wherever you want while in-game, since players have different preferences of where to have stuff on their screen. Edit: If you don't want other sound elements to be automatically muted, simply edit line 232; radioMuteOtherStreams = guiCreateCheckBox(218, 32, 132, 15, "Mute Other Streams", true, false, radioSettingsTab) Change the first true to false, and it will be off by default.
  3. It didn't work, but I somehow managed to fix it and I'm not entirely sure as to what exactly it was that fixed it. I think all I did was move it a bit further to the left and up a bit - then it worked.
  4. dxDrawText("Artist: "..tostring(metaTable.artist), 914, 598, 1355, 653, tocolor(132, 31, 255, 255), 1.00, PDZFont, "left", "top", false, true, false, false, false) I've played around with the booleans but to no avail. Also tried changing the size of the bounding box so it's even bigger, still doesn't work. Edit: Not entirely sure what I did, but it seems to have been fixed now. I think all I did was move it around a little bit.
  5. No, clip and colorCoded are both set to false(Not to mention they are forced to false, even if set to true). As is everything else, just in case. I'm using a custom font but tried to set it back to "default", still doesn't work. I just did a quick test where as I made a new drawing via the GUI Editor and toggled word-wrapping, entered a long sentence and then it worked. But as soon as I moved that into a resource to try it from there, it doesn't work. I have absolutely no idea what is going on...
  6. I'm updating my Radio resource, and am adding something new that utilizes DX Text - and I'd like to utilize wordBreak, in case it's too long to fit inside the bounding box. I remember using this back in 1.3.3 without any problems. However, now with 1.3.4, I can't get this to work at all. It just outright refuses to work, no matter what. Does anyone else have this issue?
  7. Dealman

    [Question]

    Can use above as well as this; isPedOnGround Learning how to use and search the MTA Wiki would help yourself, since you wouldn't have to ask such questions. And will speed up the development of your project quite significantly instead of relying on us to find it for you
  8. I'm not entirely sure as to what you want to accomplish, but post your current code and I'll fix it for you. Also if you could explained what you want, it would help Edit: Don't lose hope if I don't answer for a while, I blame GTA V
  9. Sorry, I just noticed a mistake I made Try this code instead;
  10. Put whatever relevant code needs to be there.
  11. 'Cause you need to add it, like this;
  12. addEventHandler("onClientGUIClick",window, function(b) if b == "left" then if source == takebutton then if getElementData(lp,"job") ~= "Carjacker" then triggerServerEvent("haveCarJob",lp) end elseif source == cancbutton then guiSetVisible(window,false) showCursor(false) end end end) You're adding an event handler for onClientGUIClick, when "window" is clicked. Then you're checking to see if the source is "takebutton". I'd recommend you construct your code like this instead to make it less confusing and much easier to understand; That way, source can be any GUI Element and you can just keep adding to it. Use comments to prevent it from becoming a labyrinth of code
  13. Aye I too have noticed that it gets bugged sometimes, will fix that soon.
  14. Thank you! If anyone has any suggestions or feedback in general, feel free to post it! Of course any bugs you might happen to encounter as well!
  15. Hello, I've been working with MTA for a while now and have specifically focused on GUI and managing streaming. So far I've made 2 "Major" Resources, which I plan to release. One of them is at what I would call a product ready for release. [F*A*G] Radio V2.3.1 This Resource is a client-side interface for streaming internet radios. It is designed so you can easily add new channels should you find some you'd like to add. (Via editing the script, I did not add a dynamic library to this as I did for Streamster. I might add it later.) I decided not to make this server-side so everyone can listen to the radio channel they want to, whenever they want to. It also comes with a visualization to make it look a bit more interesting. Features: [Main Features] • 30 Different Channels ranging from Rock to Chiptunes (No Hip-Hop/Rap was added) • Audio Visualizer • 4 Different Visualizer Effects • Library to find your favourite channel faster • Ability to search for channels in the Library • Option to automatically mute other streams [Keybinds] • Toggle the GUI On or Off Left Shift + R • Play or Stop the stream Left Shift + Arrow Up • Previous Channel Left Shift + Arrow Left • Next Channel Left Shift + Arrow Right • Change Volume Up/Down Left Shift + Mouse Wheel Up/Down (Scroll) [Commands] (Not case-sensitive) • Toggle the GUI On or Off /Radio • Show Information Window /RadioHelp [Planned Features] • More Radio Channels • Option for a Simplified Interface (Smaller, less buttons) • Open for Suggestions [Changelog] 2013-09-29 [New]: Option to output a message whenever some external sound is started. Off by default. [New]: Option to render Artist/Song Meta Info at the bottom right of the screen. Off by default. [New]: Option to show Artist/Song Meta Info in the visualizer. Off by default. [New]: 11 New Radio Channels have been added. [Removed]: Removed button highlighting as I deemed it unnecessary as well as it didn't look that great, thus not worth fixing it. 2013-10-02 [New]: Option to set other sounds to same volume as the Radio. [Changed]: Muting other sounds automatically set to off by default, changed from on. [Fixed]: Meta Info should now update correctly when changing channel with Shift + Left/Right Arrow. [screenshots] Note: I believe that the Chicago radio might be blocked in the UK, someone please confirm this. [F*A*G] Streamster This Resource on the other hand is for actually streaming server-side music or internet radios as well. The purpose of this resource is to make use of all the available functions we have to manipulate audio through MTA - and of course to make it easier for you to do so. It is currently not ready for release as it still has some pretty severe bugs that need to sorted. As well as I'm considering re-designing the GUI entirely. It already has 2 fully functional and dynamix XML-driven libraries. With dynamic, I mean that you can Stream, Add, Delete, Edit the entires on the fly and it will be saved automatically. So in case you find a good link to a song you like and you would like to save it for later use, you can simply press Add, enter the URL and Artist - Song Name, save it. Done. Features: [Main Features] • Fully Dynamic Libraries for Songs and Radios • Ability to speed up the playback rate • Ability to pan the playback rate between 1% and 200% (Can be hilarious) • Ability to apply various audio effects • Everything is server-side • Much, much more to come! [screenshots] Those screenshots are early sneak peeks. All of the design and code is a work in progress and subject to change. Sreenshot 1: Link Screenshot 2: Link [F*A*G] Chart Editor This is a little resource I made after finding out about the Google Charts API. It uses a very basic, URL based API. It comes with a simple and easy-to-use GUI which allows you to edit various parameters to make the chart you want. Please take note that this resource was only made as a proof-of-concept as well as for experimentation. And as such, support and updates will be limited - if any. [Keybinds] • Toggle the GUI On or Off B • Toggle the Cursor On or Off F3 [screenshots] Sreenshot 1: Link [Downloads] [F*A*G] Radio V2.0 MediaFire V2.0 MTA Community [F*A*G] Radio V2.3 MediaFire V2.3 MTA Community [F*A*G] Radio V2.3.1 Most Recent! MediaFire V2.3.1 MTA Community [F*A*G] Streamster 2014-01-18 [Notification]: I am currently re-writing it from scratch. Screenshots will be posted soon! [F*A*G] Chart Editor V1.0 MediaFire V1.0 MTA Community Disclaimer: All my resources are released as Open Source, you are free to edit and re-distribute them in whichever way you like. Credits are of course appreciated. Hope you enjoy either of my resources! Credits: Credits go to my friend Hex547 for incredible support when I get stuck, as well as Driggero for being a sexy schmuck.
  16. You'll have to use the event onClientExplosion and then isolate the source to make sure it was a Satchel Charge. I don't know what type it is, but I would assume mine.
  17. Do you mean engineRestoreModel?
  18. I don't know if I'm doing something wrong, but it seems like setSoundVolume is slightly inaccurate and as such makes it unnecessarily complex to make use of. For example: Code Example 1; There I'm trying to make a simple script where as you can increase and decrease the music by increments of 0.1. And if it reaches 1 or above, it will tell you that you've reached the maximum volume. And the same if you reach 0 or below. Keep in mind the wiki says that it only accepts a value between 0.0 and 1.0, yet it still goes above and below without any effect. However, whenever I try to subtract it, it will return this error - "Attempt to compare nil with number". It will still decrease the volume, though. This is what it actually returns when subtracted; It never outputs the message that the sound was muted, and I can still hear the music slightly when it reaches -7(Which is actually -0.000000007) and -0.1. It seems like it still reads -0.1 as 0.1 or it for some reason gets stuck at 0.1 but keeps returning that it's below that...? In order to get rid of the error, I need to change the expression in "if(currentvolume <= 0) then" to either equal to 0 or less than or equal to -0. For example - "if(currentVolume <= -0". While that gets rid of the error that is being output, it doesn't actually fix the issue in itself. In order to fix that, I had to add this bit of code; So finally the complete and working code would look like this; I don't know if this is a side-effect of the whole Client being less accurate than the server in terms of math or if setSoundVolume have bad calculations itself, but it seems rather silly if we have to make a workaround such as above to fix this...?
  19. As Solid already said, there is currently no way to add or edit current railways other than appearance(I believe.), you'd have to do what CrystalMW posted and that is just but a workaround and is not optimal, would also be a lot of work to accomplish.
  20. I don't think you could achieve this without using dxDrawImage. Which already has 'native' support for rotation. Correct me if I'm wrong, but I believe you can only actually re-size your UI Elements with interpolateBetween, and not actually rotate it via this function...?
  21. Since it is indeed highly suspicious, without any solid proof from either side - this won't go anywhere. It will not go back on topic and people will just come here to throw accusations left and right. That said, it's probably best this thread is deleted since it won't lead to anything.
  22. It actually is possible, I believe I saw someone whom made it possible to use Google through MTA or something like that. Point is yes, it is possible. But it would also be a whole lot of work to do. And you're most likely to be in need of understanding either PHP or HTML, or even both.
  23. You need to use aclGroupAddObject for that. If you do this, the resource doing it will need ACL Admin Permission.
  24. Dealman

    Weather

    I think he wants to set the current time of a specific map, to get a specific atmosphere. If that is the case, you will want to use this function; setTime.
×
×
  • Create New...