Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. Hi guys, please check the first post for an update. You can also download the latest version with the shortcut link included in the package. Thanks for the support and again, if you find any problems, please report them here. Enjoy!
  2. That's not what he was after. He wanted to access table inside a 2 tables with the same index. With his code a "sub-table" from table1 at specific index will be assigned to table2 at the same index.
  3. I understood once you got it "fixed". Your "Simple Lua Misunderstanding" became "Unbelievably hard to understand question"..
  4. To be honest, I didn't understand anything of what you're confused about.. Now, I'm confused.
  5. This is when element tree is very useful. When player joins a team set their parent as the team. Then you can use team element as visibleTo parameter and only players in that team will see the blips.
  6. Event handlers are executed asynchronously that means they don't get executed as the code goes. You call triggerEvent function, which gets executed but it doesn't wait for the event to finish before going to the next line.
  7. Well, if you have hundreds of objects close to each other then they will disappear. That's because streamer can render X amount of models at once. Make a forest of 25000 trees (5000x5000; 0.5 away from each other) and you will not see them all, only the ones close to you.
  8. 50p

    Death Race

    DO NOT double post for no reason. You've been given an answer. It's trial and error thing. Just copy one car and change the values. Change 1 value, start the gamemode, see how different it is, then change another value and see the difference.. This is how it works, don't expect us spending priceless time to do such simple thing for you. Here, you ask for help, not for scripts to be written for you.
  9. Thanks for the comment and the points. 1. I will add it. Only need to make proper options window which will work with everything. 2. Yes, I haven't added this yet because I've had many bug reports in the old versions which made me think on a way to create new resource without crash. 3. I would have not noticed the "*" not being there when file has been edited but not saved for a while. 4. It's going to be added in the next version. I started this project in VS2010 with .NET 3.5 but there are many bugs in VS2010 that will not let me compile the project for .NET 3.5, I will have to downgrade to VS2008 and that means I need to remake the project.
  10. Is the event even triggered? Where did you get characterID from? Don't make global variables to store IDs, strings, etc. unless it's client-side script. You can make a global table to store that information for every player or simply use setElementData instead. Also, why don't you trigger the "openBriefcase" event only for 1 player? It'd save you some bandwidth and lower the chance of a lag.
  11. https://wiki.multitheftauto.com/wiki/OnP ... aponSwitch even the example on the page shows you how to disable weapons.
  12. 50p

    Death Race

    You can't find it probably because there is no such gamemode? Have you played on a server with Death Race? Maybe you mean interstate69?
  13. He uses DotNetZip lib. Everything works fine as far as I know. I helped him via PM and maybe I didn't understand his problem.
  14. 50p

    [HELP]GUi

    Use /debugscript command and you will find out why. You will get an error on line 73 and 92. Lua is case-sensitive language. gUIEditor_Window is not the same as GUIEditor_Window. Learn how to debug your scripts. Every single scripter/programmer debug their code.
  15. Nothing is wrong. It doesn't load the files yet. I have to rewrite this part. I'll be adding Lua syntax checker next and then probably the functions on the right. I simply don't want to do too much at once because there is higher possibility that there will be bugs undiscovered by me. I will add it. I want to make it so you can drag files from windows explorer to the resources explorer in MTA:SE window as well as move the files around within resource explorer to get the resources more organized. If there is anyone who can't get it to run and crashes at start, please get in touch with me, I will need more information to track the bug.
  16. You can use the second variant where you pass pixels instead of file path. You can use downloadFile and onClientFileDownloadComplete but these both are available in nightly at this time. If you want to do it with 1.3 then you can use fetchRemote to do the same thing but instead it's the server that downloads the file and then you can send it to clients.
  17. When you assign a timer value to a variable it will hold data all the time. When timer dies, the variable still holds the timer data but the timer doesn't exist any more. Check if the timer exists before you kill it. isTimer
  18. UTF-8 should work fine. This is what I use for MTA:SE. Try ASCII and make sure the files are copied over to the resource. If it fails, you can try to use writer.WriteStartDocument(); as the first writing function.
  19. No. All you can do is debug MTA as it runs and have break points where application stops at this point and you can see what code gets executed and what's going to be next. I'm not going to explain to you how to debug because there is so much information on the internet on debugging that you can find it yourself easily.
  20. It's been some time since the last update but here it is. Like I said in my previous posts, I've been working on a new, fresh editor which is more basic but still has features which should make scripting resource easier/quicker. If for some reason it will crash, you will get an error.txt file in the MTASE folder, so just open it and let me know about the message you will get and how to reproduce the crash if possible. Thanks. Syntax checker is disabled but it's my highest priority. If there is anyone with MTASE crashing on start up, please let me know so I can get it fixed! Here is a little list of changes: New screenshot:
  21. You can read the resource's meta.xml and get all the files from there. function getResourceAllFiles( resourceName ) local files = { }; local metaRoot = xmlLoadFile( ":" .. resourceName .. "/meta.xml" ); for i, node in ipairs( xmlNodeGetChildren( metaRoot ) ) do if( xmlNodeGetName( node ) == "file" then -- check if the node is table.insert( files, xmlNodeGetAttribute( node, "src" ) ); end end return files; end Haven't tested but it's a simple function which will return all 's from specified resource (this includes .mp3, .png and all other files included in resource as ). Once you get the list of files just loop through it and add it to gridlist.
  22. We are here to help, not to make scripts on requests. If you can find someone kind enough to make the script for you then you'll be lucky.
  23. 50p

    setCameraMatrix

    No problem, good luck with the script!
  24. 50p

    setCameraMatrix

    Is the ped in the movement? If it is then you will have to use an event onClientPreRender. function getPointFromDistanceRotation(x, y, dist, angle) angle = math.rad(90 - angle); local dx = math.cos(angle) * dist; local dy = math.sin(angle) * dist; return x+dx, y+dy; end -- dist = distance function getPointInFrontOfPed( ped, dist ) local rz = getElementRotation( ped, "ZXY" ); local x,y = getElementPosition( ped ); return getPointFromDistanceRotation( x, y, dist, rz ); end -- every time you want to set camera in front of ped use this function: function setCameraFacingPed( ped, dist ) local x,y,z = getElementPosition( ped ); local fx, fy = getPointInFrontOfPed( ped, dist ); setCameraMatrix( fx, fy, z, x, y, z ); end -- if you want the camera to follow the ped but still face the ped: addEventHandler( "onClientPreRender", root, function( ) setCameraFacingPed( ped, 3 ); -- remember "ped" needs to be ped/player element end ) I haven't tested it but when I rubber duck debug it, the code should work just as you want.
×
×
  • Create New...