Jump to content

MaddDogg

Members
  • Posts

    189
  • Joined

  • Last visited

Everything posted by MaddDogg

  1. There seems to be nothing wrong with your /me snippet. Did you try to uncomment just these lines and see, if it worked? I still would like to see your command code and the result from Also type(playerSource) and tostring(playerSource).
  2. Is it clientside? Then the first parameter of a command handler function is the command text. Maybe post the whole code. Also try a type(playerSource) and a tostring(playerSource) to see, what it really is and post results.
  3. MaddDogg

    Race ERROR

    I don't have much experience with the race resource, but I guess that you made a mistake in your map or meta.xml and the script can't read it correctly, so errors come up. Perhaps post the content of your meta.xml.
  4. Oh, didn't notice them in the first post. It just seems as if your source is not a player. Please show us the trigger line, which triggers your event "carSpawn". And tell us, which line 38 is.
  5. Which is line 38? Your code is really messy, hard to read it. You should DEFINITELY use indentation. And I thought you got 3 warnings?
  6. Yes, you're actually right. Because vehicle models hold the collision model, I assumed, it would work, if you changed the collision model by just replacing the vehicle model, but apparently, it does not work, I just tried it.
  7. AFAIK there are no fixed limits. If you exceed a certain GTA given limit, MTA will stream out the farest away elements. But there is setElementStreamable, which can manipulate that behavior. You still have to be careful, because at high amounts of streamed in elements, it will have a heavy impact onto the FPS of players.
  8. Vehicles don't have a col file, because for them the collision is included within the model file (.dff). Although I don't know what you mean by "reload it", but you can most likely have different collisions by just replacing a model for certain players. You just have to use the model replacing function for those, who should have a different collision. But what's your goal? I don't get your idea behind it. EDIT: It's impossible, see my next post.
  9. Just learn scripting. https://wiki.multitheftauto.com/wiki/SetTimer You can't just expect from us that we fix every code for you, you have to do the fixing by yourself.
  10. MaddDogg

    xml problem

    1. xmlLoadFile seems not to be able to open the file. 2. You don't save the node returning from xmlFindChild. 3. The variable 'Spawn' is empty, reason is above. Check the name of the file, you're trying to open. Is it correct? Is it really in the resource root folder.
  11. You have to close the file in order to have the data written into the file. As long as it is not closed, the data will stay in the memory. https://wiki.multitheftauto.com/wiki/XmlUnloadFile
  12. As far as I know this is impossible, since there is no way to control the projectile. If I'm wrong, please correct me here. And this is still no request board. You can't just request a script, start doing one and we could help you finishing it, if you're stuck.
  13. MaddDogg

    Help... please.

    That's actually, what I told you. If you attach an event handler, the element, to which it gets attached to, has to be created beforehand. Later on I realized that also your function, which you use as handler function, needs to be located before adding the event handler. I just tried this animation and it works for me, so there's nothing wrong with the animation line itself. Just a wild guess, but try to comment out the "setPedRotation" thing. Btw, there is an extra parameter for the rotation already for createPed, so there is no need for an extra "setPedRotation" line. EDIT: I just tried your weapon merchant ped code lines for myself and it worked fine. I really can't figure out your problem. You don't get any error, do you?
  14. MaddDogg

    Help... please.

    You have to create the element first, before you "attach" an event handler to it. EDIT: I just realized that this also goes for your function, which has to be created before using it as handler function.
  15. One question: Did you write the code in your first post yourself? You can't just copy the parameter line from the wiki into your code. This is just a syntax explanation, not real code for use. You should have at least some knowledge, if you want to work with MySQL. You have to look for your MySQL socket file on your server, this path will then be used as the "unix_socket" parameter. I doubt that your MySQL port is changed, so port can be 3306. Client flags can be left out, because that's just to enable special modes etc. So it should look similar to this: mysql_connect("localhost", "root", "", "mta",3306,"YOUR_SOCKET_PATH") And now learn some Lua syntax. https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/pil/index.html
  16. Then the problem is the missing socket declaration, as I told you. Just fill out the optional parameters of mysql_connect. https://wiki.multitheftauto.com/wiki/Mod ... ql_connect
  17. That's because you use relative width and height. You should always leave the proportions intact. If the width and height is too big for a smaller resolution, then just divide both values with the same divisor, which depends on, for example, the width of the screen. So, for example: width = 128 * screenWidth / 1280 height = 128 * screenWidth / 1280 Here, your size of the image is also made for an 1280px width resolution. That means that the original size will be shown at this resolution, although at smaller ones, the image will also get smaller. Same for higher resolutions, the higher, the bigger the image. Hope I made no mistakes myself
  18. It seems like your mysql connection can't be established. Be sure that your values are correct and that no password is required, as you're not giving one. If it's running on linux, you probably also have to use the additional parameters, especially the socket, as I have to do: https://wiki.multitheftauto.com/wiki/Mod ... ql_connect
  19. I don't really get. what you want.. Like this? addCommandHandler("blah", function () setTimer(someFunc, 20000, 0) end ) Please reexplain, what you want to do.
  20. Yup. I guess that the script can't cope with multiple entries (entries with the same vehicle name).
  21. Wtf.. why didn't I see this before? Thanks and sorry for the inconvenience.
  22. Hi! Now it's time for a problem from my side, again I'm currently working on a system, in which the user should be able to see tooltips while hovering certain elements on the screen. I would like to draw this tooltip with a dx rectangle and a dx text on top of it. My problem at this point is that I can't predict the size (the width) of the text, since it's not monospaced. What would be now the best approach to get a decent width for my rectangle? I could just set a fixed width for every character, as if it were monospaced, and say "for 30 chars I will have a width of 30 * 5px * font scale", but this might be off by a lot, when many "thin" characters like 'i' or 'l' are used. Any ideas? Thanks for any help! Madd
  23. I just checked and the problem is that there is indeed a kart entry, but just with a wrong model id. <vehicle id="570" name="Kart" /> Just change that to a 571 and it should be fixed. And also remove your additional entry. Btw, 570 is a train wagon.
  24. You deserve a warning, my friend. First of all, WHY are you TRIPLEposting, just because no one is answering you after some hours? If you want his script so badly (I think that's what you want), then send him a PM. I would really like to see a warning system to this forum.
  25. There is no source at this point. I don't think you understand the concept of a source. Have a look at what parameters are given for your handler function: https://wiki.multitheftauto.com/wiki/AddCommandHandler
×
×
  • Create New...