Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. Yea, it should cause a headache! It will be a little tricky to make an "MTA Importer". Why a player would import his .map to 3Ds max? To make a little animation? We should research around MTA servers to know how is the mapper's experience with editor. Or try to discuss here... your idea is really interesting (: Basically, if you can export maps from 3DS Max then you should be able to import them back and add new models or adjustments and re-export it. The thing with editor in 3DS Max is that you wouldn't be able to test/play the maps but the idea about editor in 3DS is pretty good because it's easier to move/rotate/scale things around (at least for me). It'd be easier to make make something happen when something happens, like vehicle change checkpoints to change vehicle, give player money when he finishes 1st, explode vehicle on finish line, send them a message, etc. Like a "visual script editor" sort of thing, something like Kismet in UDK. UDK inspired me to write more advanced scripts in 3DS Max for MTA. @Benox.exe After watching this video, I feel like going back in time where creating 3D Models was very limited and there weren't many functions to speed things up. He created 3 polygons (6 triangles) in like 5 minutes? I can make that in couple of seconds in any 3D application.
  2. You're welcome. Use paper (or drawing applications) when you need to think about formulas. It's better to see what you need on paper than trying to imagine "how do I do this?"
  3. Why don't you draw your own text instead of using that text lib? The problem is that text is being drawn first but after that you draw rectangle on top of it. Events are not triggered in specific order this means if an event gets triggered and you cancel it, this doesn't necessarily mean the event will be cancelled in other resources. Drawing functions need to be used in onClient(Pre)Render events in order to see the drawings at all time. DX lib may draw the text first and then your event is triggered later.. You can try to draw your rectangle in onClientPreRender to be sure it will be drawn before text.
  4. That's because the table is not indexed. I recommend using indexed tables when you need something in order or sortable. Instead of assigning this way: myTab[ "key" ] = value; Do it this way: table.insert( myTab, value ); -- OR myTab:insert( value ); -- You can specify values location in the table: table.insert( myTab, 1, value ); -- will insert value as the first index of the table
  5. That's what I did, don't work. If I use simple gui label work To me it looks like the text library doesn't care about the order of creation. Does it use pairs iterator instead of ipairs? Like we said, DX drawings are overlapping by order of creation (it's called z-index or z-order).
  6. This is your answer: By defined he means you can't have a variable holding DX element, like for GUI elements. DX drawing's z-index depends on the order of drawing. First draw rectangle, second draw text - text will be on top of rectangle.
  7. Alignment is easier than you think. Again, paper is useful here. I drew these 2 for your information: This is the easier alignment (screen corners) This is the harder bit because more calculation is needed (middle/centre) I hope you and people who need these will learn something from these drawings.
  8. I like your style. Can you tell me how do you do the calculation? Any formula or whatsoever? That's where the brain part comes into play. This is all basic maths which you should know already. Draw on paper a square, give it a screen size (eg 1600x900, 1024x768), draw your GUI where you want and get a rough X and Y coords from paper. Draw another square for another screen resolution, draw your GUI, get coords. You can then start calculating the coords that are not screen dependent. Or a simple way, you can find the formulas from people on the forum, I'm sure it's been posted many times but I like to be independent and do everything on my own - at least I learn something new this way.
  9. I use my brain and paper to do GUI.
  10. Lua table indices start from 1, although you can still assign value to table[0] but in for loops that use ipairs or pairs, the first index (0) will not be counted, so start your table from 1.
  11. Once the source code will be released to public.
  12. The link to download has been fixed and "Check for updates" works too.
  13. The script was originally created so you can choose your skin every time you die. This is why it removed you from the team. It is supposed to show the spawn selection screen after you die and then you click "spawn" and it should assign you to the selected team. If I get a chance, I will make it more dynamic/configurable resource. Like spawn protection mode, respawn after dying without showing spawn selection screen, team protection (for clans, admins, etc.).
  14. I remember I wrote a patch which had a function getResourceFiles (it was both, server and client side) but it was never committed. It's not hard to write that function and I'm surprised it hasn't been added yet.
  15. @Al3grab, Thanks for reply. Ok, I've checked that and you're right. I will make a note and hopefully get it done in the next release. @Noddy, When you get the crash window, please click the "Send Report". It's not like one of those Microsoft windows crash report and the report is actually sent to me. Thanks. @John_Michael, I've already spoken to MTA devs about it some time ago. It will become "Official" script editor once the source code will be released but until then it'll be "Unofficial". Unfortunately, there are so many things that need to be removed and get sorted before this happens.
  16. 50p

    Qeustion

    You can create a column "Skin" and add this line to "spawn/s_main.lua" (line 43): setElementData( client, "Skin", skin.name ) Scoreboard resource should get the data "Skin" from the player, and the above line will set player's "Skin" data to the skin name, that's what you want.
  17. What do you guys think of a map editor within 3DS MAx? I've been thinking about it and even started to work on it some time ago. I made a custom group of models that can be created (in the Create tab). Currently there is an "MTA Vehicle" (vehicle spawn) that you can create, although the model that is created is one mesh. There are some drop down boxes to select which vehicle you want to spawn and a little picture of the vehicle but for some weird reason each vehicle created uses the same previously set settings. Can't show you any picture because I don't even know if I'll ever continue development of this script. I wish I could make a Map Importer too but the problem is that map files contain model IDs only and MTA creates GTA objects and there is no way to get models from GTA and create them in 3DS Max, they'd have to be exported from the game and that's not convenient.
  18. I may update it one day but at the moment I don't have much spare time. @ DhrJay, Unfortunately, you can't because that's hard-coded if I remember correctly.
  19. Thanks for letting me know! I'll speak to the provider what is going on with the site.
  20. What about https://wiki.multitheftauto.com/wiki/GuiBringToFront ?
  21. Yes, it doesn't export .col because I don't know the function name for it that is created in KAM's script because the files are encrypted. I wish I could export .col and .txd as well, this would be the most usable script for GTA, not just MTA. But it's too much work for me and creator of KAM's script has vanished. I haven't got experience with creating binary files, not to mention creating them with MAX scripts, so I don't know how to export textures to .txd files either. Anyway, thanks for using the tool!
  22. 50p

    About tables

    There is no function to do that, unless you write it. function mySecretFunctionToAddNumericValuesFrom2DTable( tab ) local sum = 0; for k, subTab in pairs( tab ) do sum = sum + subTab[ 2 ]; -- subTab is the same as: tab[ k ] which is the same as: tab[ 1 ], tab[ 2 ], tab[ 3 ], etc. end return sum; end -- Then just call the function with 2D table: local sum = mySecretFunctionToAddNumericValuesFrom2DTable( myTable ); Draken, if you look closely, he's adding numbers that are held inside tables.
  23. You're welcome. It's good to hear that you could manage to do it yourself. That makes me happy when people actually fix things without being given any code, just instructions.
×
×
  • Create New...