Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. It doesn't show up any more. I also fixed the problem with loading (mostly) map resources. Remember the time when you start MTA:SE and you get loads of windows telling you the resource will not be listed in Resource Explorer? Well, this has been fixed and even maps are loaded. The menu item "Add existing file" is now working. So, you can add any files, including scripts, configs, images, sounds, models, etc.
  2. 50p

    Little help.

    Where is the kickInactivePlayer function?
  3. If you hide the window, it is still in the memory. If you have a lot of windows but they're all hidden, then your frame rate may drop (depending on amount of RAM). Remember, not every player has fast PC. Some people have as fast PC as the minimum requirements for MTA. Anyway, you may also want to recreate window if you want to make sure everything is reset. Well, I haven't had that happening yet, probably because I haven't had that many elements. My thinking about this is that you have to reach certain address to get other elements created at old/destroyed elements address. Ideally, set the variable to nil. This will make sure that variable is freed from memory and let you know that element does not exist.
  4. When you destroy element, the variable still holds its value. So, nil the variable too. if currentWindow then destroyElement ( currentWindow ) currentWindow = nil; end currentWindow = createWindow ( 300, 200, 400, 650, "Options" ) I don't quite understand what's your goal here.
  5. Don't you forget, there are server-side functions as well. This way the resource doesn't need to be downloaded before showing the text. https://wiki.multitheftauto.com/wiki/Ser ... _functions
  6. 50p

    Tonumber.

    kmh = tonumber( string.format( "%.2f", 3.444444545488784848 ) ); -- kmh == 3.44
  7. You should use setElementVelocity on the vehicle, not the player.
  8. No problem. I hope you're clearer now about custom models in GTA SA.
  9. Read and understand please. Model names can be anything you like. Only file name of the texture that was applied to the model is important NOT the model name. Forget about model name. Apply GTA Material to the model and for Diffuse map use a texture (like you said "photo"). Then export the model. .dff files contains data about the mesh, TEXTURE NAMES and other extra flags, like 2dfx (for example lights from lamp posts). So, when you export, texture name is saved in the .dff, when GTA loads the model, it tries to load texture that was used in 3DS Max. If you applied texture in 3DS Max that was called "wood.png" then after you export the .dff, make sure that the .txd has a texture named as "wood".
  10. You should name the texture in .txd with the same name as the name of the file that was assigned to the model, not the material name. If your material name is "material" and the texture file name that is used by the material is something like "wood" then you have to make sure the texture name inside .txd is the same as "wood" not "material". To me it looks like you named the texture by the name of the model which is incorrect unless your texture file name was the same as the model name.
  11. Each function that has "..." as parameter, passes another hidden table that is arg. So, you can use arg instead of creating new table with all parameters. In addition, arg table has a addCommandHandler("text", function( player, command, ... ) local text = table.concat(arg, " ") -- This way the player can type texts with spaces. outputChatBox( text ); end) table.concat returns string so there is no need to convert it to string.
  12. I don't know how is this possible to get "Attempt to compare boolen with number." at that line if you're not comparing anything there. Even if, that doesn't make sense since "not" can be used with any sort of variable.
  13. I still get the same error Which line is the error at?
  14. if (not kills) then setElementData(killer, "Zombie kills", 0); kills = 0; end
  15. 50p

    Cursor question

    Another resource is showing the cursor? Check if cursor is shown (isCursorShowing()) after showCursor( false );
  16. In the future release though.
  17. 50p

    [REL] ResourceZipper

    If you use MTASE then you probably know that you need at least .NET 2.0. That's all you need (apart from a few .dll that MTASE uses).
  18. 50p

    [REL] ResourceZipper

    Please, do not triple post! The primary goal for this tool was to zip resources but one by one. Yes, it compresses all the files that are included in meta.xml. I suppose your "http\mods-system\" has a meta.xml in it. Try to use different path (without "-" in it), it shouldn't be a problem though. I think it might be caused by some .dll's that this tool relies on. If it doesn't work, please wait for new MTA:SE which will have integrated zipper.
  19. Modules are written only in C++. They can define new Lua functions that can be called like any other MTA functions. Different kinds of SDKs can be written in any language that supports request web page with HTTP POST and encode/decode JSON. That's C#, Java, PHP, etc. even C++.
  20. 50p

    [REL] ResourceZipper

    Did you drag'n'drop 1 resource or entire resources folder? If you want to zip all the resources, you have to do it 1 by 1 because this was made to release 1 resource which you want to release.
  21. C++ is a programming language whereas Lua is a scripting language. Programming and scripting is almost the same but traditional programming is more complex and has more control. You are limited with scripting in Lua for MTA since MTA blocks Lua's libraries and some of functions from different libraries. Programming in C++ has almost no limits and MTA would have to disable a lot of its features. C++ has to be compiled to compute, scripts don't have to be compiled and are easy to modify. Basically, scripting is very simple compared to traditional programming. You can't program resources in C++ but you can program "modules" that can extend MTA server's features. https://wiki.multitheftauto.com/wiki/Modules
  22. 50p

    heal gun

    setElementHealth only gives health. You have to fixVehicle to get the visual damage to get changed. https://wiki.multitheftauto.com/wiki/FixVehicle
  23. 50p

    replace a wheel

    I'm not saying to give them all the code. When you do, tell them what is what, what each line does or the key lines. But giving faulty code is just wrong. They'll never learn from faulty code since they will make the same mistake over and over because that's how they learnt the first time. I know what you're saying but believe me, wrong code is wrong and should not be posted. That's just making the problem even worse. Telling people where the error in their code is way better than giving them faulty code. I don't usually give the entire code out to people, I give them tips and links where they will get the answer to their problem. That makes them use wiki more since most of the answers (if not all) to their questions are there. Lead them but in the right direction. Now, stop the offtopic.. It's getting way too far.
  24. 50p

    replace a wheel

    Leaving error in the code you're giving is just wrong! If you'll give people code with errors, they will learn from the code which is wrong and will keep coming back asking for help again instead of having correct code. If you're leaving an error in, tell them about it otherwise you'll be the one that needs to learn before helping others.
×
×
  • Create New...