Jump to content

eAi

Retired Staff
  • Posts

    2,986
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by eAi

  1. Well, you're not actually calling doReturn from your php page, so what do you expect it to return? Also, your host is inserting adverts into your pages, this is likely to break callRemote.
  2. eAi

    EDF :S

    benxamix2 is right, and I think based on his edit, his code now works. EDF is designed to make it so you can add custom element types (e.g. custom_ped) and have the editor work with them. See https://wiki.multitheftauto.com/wiki/EDF getElementsByType is perfectly valid to use with any element type. As the wiki says: "theType: The type of element you want a list of. This is the same as the tag name in the .map file, so this can be used with a custom element type if desired."
  3. Make an attempt first.
  4. eAi

    MTA:SA crashing.

    Don't you have a crash dump?
  5. This is, of course, how GTA calculates what you're going to hit when you fire a weapon. You can see how MTA calculates the shot target here - this generally matches how GTA does it: http://www.google.com/codesearch/p?hl=e ... =rc&l=3971 Maybe this is something that could be exposed to scripts...
  6. Glad to see you're still keeping an eye on things Cray... I'm somewhat in that boat now...
  7. https://wiki.multitheftauto.com/wiki/Resource:Mapmanager
  8. Read the addCommandHandler wiki page for many more examples.
  9. As the wiki says, this function does not work on local players: https://wiki.multitheftauto.com/wiki/SetPedAimTarget This is because the aim on local players is tied to the camera position, as such what you really want is to move the camera, not the aim. I don't think we have a specific way to do this at the moment.
  10. We've always recommended _not_ using onConsole for this. addCommandHandler is both easier and more secure as you can easily secure console commands from being used through the ACL, plus write much less code. This is a very silly way to do it. Your code: function input_Console ( text ) local command = gettok (text, 1, 32 ) if ( command == "my" ) then local playerName = getPlayerName ( source ) local actionText = string.sub ( text, 3 ) outputChatBox ( " *" .. playerName .. "'s" .. actionText .. " ", root, 255, 40, 80, true ) end end addEventHandler ( "onConsole", getRootElement(), input_Console ) How it should be done: function myCommand( playerSource, commandName, ...) local actionText = table.concat( arg, " " ) local playerName = getPlayerName ( playerSource ) outputChatBox ( " *" .. playerName .. "'s" .. actionText .. " ", root, 255, 40, 80, true ) end addCommandHandler("my", myCommand)
  11. getTickCount gives you the number of seconds the system has been running for.
  12. As you can add extra information to the meta.xml, perhaps you could use that to specify the replacements?
  13. I've submitted a bug to add support for this: http://bugs.mtasa.com/view.php?id=5601 You can imitate it though by doing three pLoS calls in a triangle, though bear in mind that this function is quite expensive.
  14. By 'can', varez of course means 'can't'. And he's right, you can't check if UDP ports are open, at least not in a standard way.
  15. eAi

    Gta no longer works

    There's no way that MTA can interfere with single-player GTA, assuming you're not playing a 5 year old version of MTA that is.
  16. You haven't answered the question. What returns nil?
  17. This isn't an issue we can do anything about. It's between you and the server owner, we don't police servers ourselves.
  18. Nice and amusing - pity about some of the bad lag it showed, but otherwise good
  19. eAi

    Driving bot

    A* is a fairly simple pathfinding algorithm that's widely used.
  20. eAi

    Driving bot

    Looks like a good start You should be able to extract all the paths from GTA - or someone may have already done this. Then you'd need them to make decisions about which way to go at junctions which might lead to pathfinding if you want them to drive to particular locations. Anyway, that's looking good!
  21. Though, of course you could write a script that would let you place sounds in the map with the map editor
  22. To avoid triple posting, you can use the edit button.
×
×
  • Create New...