Jump to content

eAi

Retired Staff
  • Posts

    2,986
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by eAi

  1. eAi

    DSM map editor

    I'd suggest posting some screenshots. You'll be happy to know that the 'official' map editor is making very good progress now, it should be out sooner rather than later
  2. Tut tut! MTA has been pretty carefully designed, generally it's best to follow our example rather than go and reinvent the wheel. Unless you have a good reason of course
  3. There's no built in way, but you can cheat as Borov says.
  4. eAi

    How i can 2?

    English please.
  5. Someone should modify webmap to work via the php interface (possibly with caching to reduce load on the game server)... Should be pretty easy...
  6. eAi

    How i can 2?

    http://development.mtasa.com/index.php? ... dComponent
  7. Glad someone has done this finally
  8. Although you can add element data, the more acceptable way (and the way the upcoming editor will work) is to create a new element type. <gaspump posX="500" posY="200" posZ="20" /> Then in the onResourceLoad event, get the set of all gaspump elements (getElementsByType) and create markers for them. For example (untested): -- get all the gaspump elements in the resource just started local pumps = getElementsByType ( "gaspump", getResourceRootElement(loadedResource) ) for theKey,thePump in ipairs(pumps) do -- not sure this works, you may need to use getElementData on posX, Y and Z local x,y,z = getElementPosition(thePump) -- create our representation (this could be anything, even more than one element) local pumpMarker = createMarker ( x,y,z, "cylinder", 10, 255, 0, 0, 255) -- make the marker we've created a child of the gaspump element (so it's deleted when the map is and we can easily retrieve data from the original element using getElementParent) setElementParent(pumpMarker, thePump) end You've then got a marker for each of the pumps, which is a child of the 'gaspump' marker. Then, in your onMarkerHit handler you just need to use: if getElementType(getElementParent(source)) == "gaspump" then -- whatever you want here end This will check that the marker being hit is a child of a 'gaspump' element. Alternatively, you can use addEventHandler to attach your handler to each individual gaspump element when you load them. This avoids the check in the handler and is marginally more efficient. The -major- benefit of this method is that you're hiding the 'representation' of the gaspump from the map file. The map file doesn't know that you're using a marker, you decide that. If in the future you decide you want to show gaspumps as objects or as a different kind of marker, you can do that just by modifying your script, without having to get any map makers to change their maps. This is a very widely used method in programming - separating the model (the data) from the view (what you see). I hope this helps, if you don't understand, feel free to ask on IRC or here.
  9. eAi

    Future of MTA:VC?

    What Talidan says is accurate. We'd like to do VC, but it really depends on both our interest in VC lasting and the community's... Making mods for old games is done, but it's a fairly niche thing to do... So yes, we'd like to have MTA back on VC, but it'd be a lot of work...
  10. ACL works for any group of users - admins, half-admins, moderators, banned players, whatever. You can configure it with the acl.xml file or using the ACL scripting functions.
  11. You really have to use the ACL, that is what it is for. It's a matter of adding a line for each command in the admin group and specifying 'false' as the last argument for addCommandHandler for each of the commands you want to restrict.
  12. The neatest way to do what you're trying to do here would be to code the site using PHP and use the PHP sdk to pull the data from the game server. This will avoid using iframes and allow you to make it fit your design neatly.
  13. You're welcome to fix these issues and send them to us and we'll include it in the release, I'm not sure if we'll have the time ourselves.
  14. Should be around, just give me a PM when you're there.
  15. Well, have a look at http://development.mtasa.com/index.php? ... Web_Access Come on IRC (#mta.scripting on irc.multitheftauto.com) and I can talk you through it.
  16. You could make a live chat relay too, which would be quite interesting. Maybe just allow the chat to be viewed rather than sent...
  17. I created webmap very quickly, really as a proof of concept. You're welcome to improve it, if you'd like alternative images hosted for it, send them to me and I can put them on the map server.
  18. You've disabled it's access to callRemote in the ACL.
  19. Saying what we're saying in 'mumbojumbo' is not likely to get us to help. Which bits specifically don't you understand, don't get us to rewrite everything we've written targeted at a 5 year old.
  20. The documentation for onClientColShapeHit says that the parameters passed are 'element theElement, bool matchingDimension', you're using 'target, playervehicle, id' for some reason...
  21. You should not receive an onClientPlayerQuit event on the client of the player that quits, for the reason stated by tma. The server receives the fact that you've quit directly from the network layer. It's not a 'can I quit please' request, it's 'I've quit, bye!'. As such, once the server receives this, it can no longer send any data to that client, including a quit event. I can't really see what you would want to do on a client that's about to quit - you can't send anything to the server, you can't display anything on the screen...
  22. I've passed this to QA to test. Thanks for reporting it.
  23. The second argument of addEventHandler is the point in the element tree that the handler is placed. You'll capture events that come from child or parent elements of that element. The 'source' of the onClientColShapeHit event is the colshape, not the player. As such, attaching the event to the player will mean the event is never triggered as the player is not a colshape. Either do what 50p says and add a check in the function (and change thePlayer to the root element) or change thePlayer to your colshape.
  24. You should not need to modify an existing resource, you can just run resources side-by-side.
  25. You should in theory be able to do: setVehicleIdleRespawnDelay(root, 20000) Which should work for all the vehicles - might want to test it though. Most functions should work like this, if they don't please tell us so we can fix it.
×
×
  • Create New...