Jump to content

eAi

Retired Staff
  • Posts

    2,986
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by eAi

  1. You should probably avoid using executeCommandHandler as this is restricted by default (only admin resources can use it). Instead, use call. http://development.mtasa.com/index.php? ... otemanager lists the functions that votemanager lets you call.
  2. I'd guess it includes the titlebar in it's height. This is fairly common with GUI systems but not exactly ideal... Is the percentage you have to offset it by to get it right consistent across different resolutions? That's easy enough to do yourself with the screen width/height I've reported this Not seen this. Try setting the velocity to 0 and spawning a bit above ground level (you can get the height of the vehicle using getDistanceFromCenterOfMassToBaseOfModel) Not sure what you mean, it should be very reliable. Got a test case? You might want to try using testLineAgainstWater instead. It's worth noting that collision isn't loaded for areas you aren't in, so the processLineOfSight, getGroundPosition and getWaterLevel will be inaccurate. You can easily protect your radarteleport function by setting it's 'restricted' boolean to true by default. This means admins have to allow it explicitly in their ACL for the users who should have it.
  3. I very much doubt this is the case - all newly joining clients are told the location of every vehicle acording to the server... It doesn't differentiate between admin created vehicles and map created vehicles. Can you produce a series of steps to reliably reproduce this?
  4. I don't believe it is scriptable, beyond the obvious things (like adding blips). What would you want to do with it? Feel free to add it to the manual
  5. They're stored in accounts.xml. You probably need to add the user to a group in acl.xml too that allows them to join. You may need to create a script that gives them X seconds to login before kicking them. Alternatively, you can rely on serials and keep a list of serials for your users.
  6. I'd suggest you could use settings instead of custom commands too.
  7. Try toggleCameraFixedMode instead of your setCameraMode.
  8. eAi

    Welcome Message

    Can I remind people that you DO NOT have to use zip files for resources. You can just make a folder (named as your resource is) in your resources folder and use that (placing meta.xml, maps, scripts etc in there). You shouldn't need an ACL for this example either, and I'd suggest you avoid using on[something] for function names, it's just going to confuse things.
  9. I haven't looked at the tool, but I've no idea why you're creating a resourcecache? Resourcecache is a temporary folder used for extracting files from zip-based resources. Plus I'd point out that race has a built in converter...
  10. Visit your server's web interface and just add general.ModifyOtherObjects to a new ACL, then create a new group for ScriptEditor with resource.ScriptEditor as an object and your new ACL.
  11. Your account may have been banned. I'll see why. Edit: I've unbanned your account. I'm not sure why it was banned and the people who might have banned it aren't around. I'll ask them when they are and of course reban you if it was deserved! In the meantime, have fun and play safe
  12. I strongly recommend against using onConsole - use addCommandHandler. This is more efficient and can be restricted with the ACL, plus the players can bind to the commands. What do you mean by XML Multi-Language system?
  13. eAi

    Positioning Camera?

    dab, not entirely sure what you're saying. The code you quote will call the function only when the local player spawns.
  14. eAi

    /save command

    There's no real issue with guests being able to create their own accounts. You'd probably want to wrap it in a nice GUI though.
  15. You generally shouldn't be coding scripts that modify the ACL unless that is their main purpose. You should rely on the server admin to do that. You can use hasObjectPermissionTo if you want to check if you have the correct rights and warn the admin if need be. If you have a setting the admin can change, use the settings system, namely get. This allows the admin to change this setting 'on the fly' and without editing your zip file. If you want to prevent users being able to call your console command by default, specify 'true' as the last boolean for the addCommandHandler call: bool addCommandHandler ( string commandName, function handlerFunction, [bool restricted = false] ) If restricted is true, by default nobody can call the command, the admin will have to add it to the ACL for the users they want to be able to access it.
  16. The resource 'fr' needs to be running. If you're an admin, type 'start fr' in the console (without quotes).
  17. Let me just emphasize that you should not have to create an array for player data, use setElementData and getElementData instead.
  18. eAi

    [TUT] Random spawn

    Avoid coding maps as scripts. It's considerably slower to load and uses more bandwidth. It also means that anyone wanting to create maps for your gamemode has to know how to script, plus it won't work with the soon-to-be-released editor. I'd say this is certainly NOT the way to do this and I'd really encourage you to spend a few minutes to work out how to use maps - it's really very easy.
  19. I've just fixed this, you can now register at mtabeta.com and login using the same details for the wiki.
  20. Didn't we have this in vice city? Can't remember. Either way, a resource could add this easily enough. We won't, we're trying to code as much in resources as is possible.
  21. Use the web interface - which is currently Work In Progress. You can add your own functions fairly easily if you want to.
  22. eAi

    Suggestion

    Feel free to improve webadmin. If you do, send it my way and we'll include it in the release.
  23. eAi

    MTA functions

    We've got a wiki that will be made public on release that has both tutorials and documentation for all the script functions, including examples for about 90% of them. Once we release we'd like to have the community's help finishing the documentation so that we can focus on developing new features rather than editing it!
  24. Looks good. You'll be happy to know MTA:DM has loads of potential in the stats department
×
×
  • Create New...