Jump to content

MaddDogg

Members
  • Posts

    189
  • Joined

  • Last visited

Everything posted by MaddDogg

  1. MaddDogg

    Report MTAQA Faker

    Those idiots are around everywhere, I myself had several of them in the last years. And they can almost never actually do, what they threaten, it's just their bluff. Just ban them and that's it. Btw, I've always wondered what the QA in MTAQA meant, could somebody please clear that up for me?
  2. MaddDogg

    Ped driver?

    No, peds can also be created and animated serverside.
  3. I guess this function is supposed to color all blips of players in the team color of the player? Did you check if the player is really in a team? Add some debug messages to check, where it stops. Also, I think getAttachedElements always returns a table. You should rather check, if the table has values in it, e.g.: if #attachedElements > 0 then
  4. What's that? local playerTeam = getPlayerTeam" class="kw2">getPlayerTeam" class="kw2">getPlayerTeam(source)
  5. MAN THAN USE IT! In your script there are OBVIOUS mistakes, if you don't want to see it, then don't, but no one will fix that for you.
  6. There are two obvious typos (wrongly written function/variable names) in your script. They're EXTREMELY easy to spot. You also might wanna use setElementVelocity.
  7. MaddDogg

    Ped driver?

    It theoretically is, but you would have to write the AI probably also using the path system from GTASA. And no, it's not easy.
  8. MaddDogg

    event

    If you want a directx element not to be drawn anymore, then remove the respective onClientRender event handler. removeEventHandler
  9. Haha looks really awesome! But you really have to get used to that low height of your view point, now you feel so small I also noticed that when starting to aim and when you stop shooting, the camera acts a bit weird for one second. I don't know why and if fixing is possible, but just wanted to mention it. Great job!
  10. MaddDogg

    "Solved"

    Did you read this? viewtopic.php?f=106&t=28964 The prebuilt MTA server files are for 32bit, to get it working on 64bit, follow the instructions of the tutorial above.
  11. How about you actually open the wiki once and just read it? https://wiki.multitheftauto.com/wiki/addEventHandler On this page you will find, why there is a 'false' in the addEventHandler in the code. This snippet has also nothing to do with the marker part, it's just for the button in the GUI window. And seriously stop double posting. There is an edit feature for forums like this, you know. I'm not gonna write you your whole script. To me it looks like you haven't even the slightest clue of what actually is an event, why to attach them or even how the whole element system in MTA works. So start learning scripting, otherwise you will never be able to understand anything, we explain to you in this thread.
  12. function spawnBMX() ... end addEventHandler("onClientGUIClick", Button1, spawnBMX, false)
  13. On the thing with SAMP bots: They just drive a patch predriven by you. They have no ability to follow you and just drive their prerecorded thing. I guess this is done by just saving the positions periodically at recording and later on having the bot drive from one point to the next, which is still quite easy to do. To actually make a dynamically driving and following bot, you would have to do something like this: Program the AI to find the (best) route to you, around obstacles, react to situations like when they hit a wall or when their car is upside down or when another player hinders them (rams them). And that's not all to it. To accomplish all that needs a LOT of work, skill and plain old time. It's something, which is out of reach for 99% of the people visiting this forum, and the rest is not willing to put so much effort in a still very basic AI, I would guess. I hope you now understand, why we can't help you with this. And since you seem to be very new to scripting, this is just nothing in your reach right now.
  14. How about figuring something out by your own? This isn't a place for "hey i want a script, can you make it for me?" Just attach some click event handlers to the buttons and call an according function. The function should spawn the vehicle with the position, which you get from the marker. Also, of course, create a marker. That's pretty much all you need: https://wiki.multitheftauto.com/wiki/CreateMarker https://wiki.multitheftauto.com/wiki/OnMarkerHit https://wiki.multitheftauto.com/wiki/OnClientGUIClick https://wiki.multitheftauto.com/wiki/GetElementPosition https://wiki.multitheftauto.com/wiki/CreateVehicle
  15. Is it so hard to understand that it's not that easy? No one will be willing to do that for you just now, since it's something really hard and needs a lot of work. Even very good programmers need quite some time and effort to program such an AI. So just accept, that it's out of your range right now. Try to find an easier task to do, but don't start off with "programming an AI", since that's one of the most difficult parts of game world programming.
  16. MaddDogg

    Help :P?

    I wouldn't even know that that's meant to be a script No seriously, you should consider reading the basic tutorials on MTA scripting. https://wiki.multitheftauto.com/wiki/Main_Page https://wiki.multitheftauto.com/wiki/Scr ... troduction And of course learn Lua, because your syntax doesn't resemble Lua's one bit: http://www.lua.org/pil/index.html
  17. You should also negate the propagation of the attached handler, otherwise it will be called, if you enter any marker.
  18. It's not as easy as you might think, actually it's quite hard. If you just want a bot, which runs around with no clue, follows you or just stands still, then that's no problem. But to write a bot AI, which races you on a track, is way harder. So I'd advise you to refrain from this idea and start off with something easier
  19. That's a complete mess. I think you should first learn how to script properly, because your script makes absolutely no sense. Dont take that personally, but you just won't get far, when you don't know the basics. https://wiki.multitheftauto.com/wiki/Scr ... troduction
  20. Then remove the loop and set the player team just for the source element inside the teamSpawn function.
  21. Yeah, just create a new topic for every new one sentence question... To have bots race you, you would have to write their AI, and I don't know of any existing script, which includes that. So, yes, it's hard.
  22. https://wiki.multitheftauto.com/wiki/Cli ... _functions https://wiki.multitheftauto.com/wiki/EngineLoadTXD https://wiki.multitheftauto.com/wiki/EngineImportTXD https://wiki.multitheftauto.com/wiki/EngineLoadDFF https://wiki.multitheftauto.com/wiki/EngineReplaceModel I don't know, if there is any interface for replacing models in the race script, so just write your own resource replacing the models at onClientResourceStart.
  23. First of all, great script and very handy! Good job! But I found several bugs, which i would like to report; here are some of them (also some trivial feature requests): - The "Created: " lines in GUIEditor_output.txt have a little "bug" at the date. The month value of getRealTime() is always between 0-11, but since you would normally expect it to be 1-12, you should add +1 to it, so that it doesn't say 13.00.2011 for today's date. Respective line would be in guieditor_s.lua, line 21. - Any image, which is created, when loading code from the output file, is the mtalogo.png. I don't know, if it's a bug or deliberately done like this for debug reasons and forgotten about, but the respective line is found at load_gui_c.lua, line 259. - When wanting to create an image by using "Create image" from the context menu, sometimes just nothing happens, when you try to drag the area for the image after selecting the source image. I don't know, why and when it won't work from time to time, but just mentioning it. - When changing the title of a with dxDrawText created text, the old text isn't shown in the editbox, where you enter the new title, as it is when editing guiCreateLabel titles. Maybe this feature is just missing because you can't really retrieve the text from a drawn text like you could with guiGetText(), but you could save the titles in a table. - You should really add the possibility to create scrollbars and scrollpanes, since it's a pain in the butt to create them manually. And with 1.1, there are also the comboboxes, to which it would be great, if you could add support for them, too. - The horizontal and vertical alignment is not restored for the first dxDrawText to load, when loading code from the output file. If you have 2 dxDrawText lines to restore, just the first one won't have the correct alignment. - I don't know if it's possible to do, but you could add the feature to change the item text for gridlist rows, but this might not be easy to do, since it seems that when you click a row, the clicked item is actually just the gridlist itself. I found some more bugs, which I can't recall anymore, also the share feature seems to be quite buggy still (especially for the other one viewing your gui), but I hope you find this helpful and good job again!
  24. Well the parameters, which the script expects at cancelalldamage, isn't what the event onClientPlayerDamage will give you. The second parameter is the weapon, with which the damage was generated. Have a look at this: https://wiki.multitheftauto.com/wiki/OnC ... ayerDamage So actually, your playerSource variable holds an integer in the end, not a player element. Regarding your random spawn: What did you already try? You just have to get a random number between 0 and the width or length of your area. So a calculation for the x value could look like this: spawnX = 1200.0 + math.random(0, 140.0) 1200.0 is the minimum spawn position, 140.0 the width of your spawn area.
  25. There is a Code Highlighting API here, which I also use, but which isn't up to date anymore.
×
×
  • Create New...