Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. I have no idea how it can stop downloading after downloading has started. Usually there is something wrong with meta.xml but you should get error message in this case.
  2. https://wiki.multitheftauto.com/wiki/Meta.xml You can always start resources with "start" command, even if it's gamemode. If it doesn't start downloading client-side files then you must be getting error messages. Check the console.
  3. https://community.multitheftauto.com/index.html?p=resources If you search for "replace" you may find something you are looking for.
  4. Yes, I suppose so. It's because if this was possible you could set player to be parent of another player. For instance, sending message with outputChatBox to parent would send this message to its child therefore it wouldn't be "private" message any more. That's just my theory. What are you trying to do? There is probably different way to achieve it.
  5. I'm not sure about that. Why don't you check? I just posted it because that's the only setting control server side function. If it doesn't work then there is no way to tell ped to move in server side script. I haven't followed MTA development for pretty long now so it may not work.
  6. Try to change its health from server-side then.
  7. Be patient and in the mean time, research. Do you get the same warning about bad argument in spawnPlayer? If so, you may have to convert the coords you get with getElementData to number before you pass it to spawnPlayer. You usually get string when you try to take data from an element which was created by .map file. local x = tonumber( getElementData( value, "posX" ) );
  8. The problem is, vehicles max health is 1000 (not over 9000). So when you set its health to 10000 it may change it back to 1000 since it's max health. Players on the other hand can have different health values and health bar lengths. Also, I'm pretty sure the health is not synched when you change it client-side.
  9. Also, you should use https://wiki.multitheftauto.com/wiki/SetControlState to make them walk, run, etc. There was a resource similar to what you want to do but it was never released to public due to some problems, it used animations like what you're trying to do but you should use controls, much easier. It had all paths in a few files (or 1, can't remember now). The paths file was as heavy as 5MB. I'm not sure if you can get that resource from somewhere.
  10. You can have function inside another function but you don't define it the same way you usually do. You do it this way: local myFunc = function() return 1+99 end myFunc() @MasterTobi, what exactly is your problem? I'd advice you to learn some more maths so that you can calculate the rotation for ped instead of having them hardcoded.
  11. 50p

    OnPedWasted issue

    Those events are there mainly because of peds. For players there are separate events. Every player is a ped. Not every ped is a player.
  12. 50p

    OnPedWasted issue

    Those events are there mainly because of peds. For players there are separate events. Every player is a ped. Not every ped is a player.
  13. Any error or warning messages? Does it work sometimes but sometimes doesn't? All I can think of at the moment is the math.random function returning number of invalid model. You shouldn't do that.
  14. Any error or warning messages? Does it work sometimes but sometimes doesn't? All I can think of at the moment is the math.random function returning number of invalid model. You shouldn't do that.
  15. 50p

    Interstate69..

    The version on community site is probably outdated. You should get the latest version with MTA installer.
  16. 50p

    Interstate69..

    The version on community site is probably outdated. You should get the latest version with MTA installer.
  17. Once you learn how to debug what is basically showing what variables contain in your chatbox or debug window, you will fix many scripts yourself, even with little scripting knowledge. Most of people posting their problems here just ignore debugging what makes them go mad sometimes because they can't wait for replies. You have to understand error messages your scripts may give you since they will come up very often if you're new scripter. If you don't understand English very well, use a translator or a dictionary to find out what wiki is trying to tell you.
  18. Once you learn how to debug what is basically showing what variables contain in your chatbox or debug window, you will fix many scripts yourself, even with little scripting knowledge. Most of people posting their problems here just ignore debugging what makes them go mad sometimes because they can't wait for replies. You have to understand error messages your scripts may give you since they will come up very often if you're new scripter. If you don't understand English very well, use a translator or a dictionary to find out what wiki is trying to tell you.
  19. These tutorials are outdated unless someone has changed them and I don't know it. Why don't you debug it yourself? Learn to debug, it will save you time to wait for reply and save us time asking you to find out what "this" and "that" returns, holds, etc. As I said, these tutorials are outdated so you better try looking at wiki instead or force authors of these tutorials to remake them. Are the markers actually created when you click? If so, I can't believe it's this code that creates the marker. cylinder seems to be variable. Have you defined it somewhere? It should be string "cylinder". Similar with if statement (where teleport is). It's almost morning here... I'm tired and there is so many errors in the code that you should trace them yourself. Again, debug.
  20. These tutorials are outdated unless someone has changed them and I don't know it. Why don't you debug it yourself? Learn to debug, it will save you time to wait for reply and save us time asking you to find out what "this" and "that" returns, holds, etc. As I said, these tutorials are outdated so you better try looking at wiki instead or force authors of these tutorials to remake them. Are the markers actually created when you click? If so, I can't believe it's this code that creates the marker. cylinder seems to be variable. Have you defined it somewhere? It should be string "cylinder". Similar with if statement (where teleport is). It's almost morning here... I'm tired and there is so many errors in the code that you should trace them yourself. Again, debug.
  21. https://wiki.multitheftauto.com/wiki/Main_Page You can find parts of scripts on most if not all of the function pages (examples and other scripts are what you learn from best).
  22. https://wiki.multitheftauto.com/wiki/Main_Page You can find parts of scripts on most if not all of the function pages (examples and other scripts are what you learn from best).
  23. Please say which script did you take it from because someone who made it was at similar scripting level as you are. (Function names Script1, Script2, etc. wtf?) -- Change this: function Script4 ( key, keyState, element, x, y, z ) -- To this: function Script4 ( key, _, _, _, x, y, z ) -- you don't need keystate, nor absolute screen coords but you need world x, y and z ------------------------------------------------------- -- Change this local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local theMarker = createMarker ( worldx, worldy, worldz, cylinder, 1.5, 1, 255, 0, 50 ) -- To this: local theMarker = createMarker ( x, y, z, cylinder, 1.5, 1, 255, 0, 50 )
  24. Please say which script did you take it from because someone who made it was at similar scripting level as you are. (Function names Script1, Script2, etc. wtf?) -- Change this:function Script4 ( key, keyState, element, x, y, z )-- To this:function Script4 ( key, _, _, _, x, y, z ) -- you don't need keystate, nor absolute screen coords but you need world x, y and z--------------------------------------------------------- Change this local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local theMarker = createMarker ( worldx, worldy, worldz, cylinder, 1.5, 1, 255, 0, 50 )-- To this: local theMarker = createMarker ( x, y, z, cylinder, 1.5, 1, 255, 0, 50 )
  25. I know that it annoys me too but as I've said that already, I'm using 3rd party highlighter library which has some annoying bugs. The author of this library has been inactive for ages and I'm not going to fix it any time soon. I want to get rid of all the bugs not related to syntax highlighter first and then, maybe, I'll try to use different library which someone suggested in this topic. I'd suggest not to use "function" word in function name. Use "Func" instead, like "callClientFunc", that's what I do. I'm not sure maybe I made a mistake in lua.syn file which messes up. If I did messed up and someone found a fix for this then please post lua.syn file here so others can use it too. Thanks. BTW, I must admit, MTA:SE seems to be so much stable now than it used to be. I don't receive bug reports (crash reports) very often, in fact I haven't received any for 3 days now (I used to get 3-4 a day!). I really want to get this tool "bug free" but college takes most of my spare time.
×
×
  • Create New...