Jump to content

eAi

Retired Staff
  • Posts

    2,986
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by eAi

  1. It'll be the game's physics fighting your inputs. If you place a vehicle above the ground, it'll keep trying to fall towards the ground every frame. setVehicleFrozen may help - as may moving this code client side and doing it as part of the onClientRender event.
  2. Yes, callServerFunction is an extreme example of a very insecure system, but something more simple: Say you have a spawn screen that pops up, asking where you'd like to spawn, and what character. Maybe that pops up after you've been dead for 20 seconds or something like that. One way you could implement that would be to expose a 'spawnPlayer' event on the server to the client, where they specify where to spawn and the skin to use. Nice and easy. Of course, Mr Naughty Guy comes along and sees you've done this, hacks his client, and has an instant teleport script. Alternatively, you can provide a more specific event that's only valid when the user has been told to show the spawn popup by the server. The difference is you've got all the key game logic server-side and self-contained. You see a player dies server side, you wait 20 seconds server side, you tell the client 'show the spawn player popup' and tell me what the user clicks on, you wait for the response, when they give it, you spawn the player where they specified, and they're no longer allowed to use that event. Perhaps you have other limits - certain skins they can't use. You may validate these in the popup window - maybe you only show a few skins, but you've got to validate that on the server too. It's all about validating the input from the client, and assuming they may be trying to game the system. It's the same principle you right client-side and server-side code for web pages. Never trust the data you're being given by the client. So with this in mind, you should obviously see that you'll have to duplicate most client-side logic on the server too, so you want as little on the client as possible. The client should be for presentation and for requesting input, never for game logic.
  3. Gamesnert has provided a pretty good overview, but the I don't agree with his conclusions. Everything should be server side if it can be. You should aim to put purely 'presentational' stuff client-side. You should avoid trusting the client at all, if you possibly can. Any interface you provide between the server and client should be as minimal as possible - don't let the client call any server function for example. It may be convenient for you - but it's a big risk. This is from a theoretical point of view, in practice, you'll have to make compromises probably.
  4. eAi

    SA-MP vehicles to MTA

    I'd strongly suggest you use .map files rather than loads of createVehicles - it's more efficient in terms of bandwidth, and allows you to edit the map with map editors and the like. I believe there are converters out there to do this for you.
  5. eAi

    Unexplained ping

    Contact your ISP - there's little you can do about it yourself. Or get a new ISP.
  6. eAi

    Unexplained ping

    Maybe your ISP is throttling the MTA ports...
  7. eAi

    Settings system

    It's JSON - see http://www.json.org So [[6,1]] is an array containing 6 and 1.
  8. They won't. The streamer isn't aware of which map file an element belongs to, or even which resource.
  9. Outdated yes, but the performance isn't likely to have got worse.
  10. That's definitely not the case, no sane database would rewrite the whole file every time. In my uses of SQLite and MySQL, they're roughly comparable in speed, at least in a similar order of magnitude. http://www.sqlite.org/speed.html might be of interest. There may be issues with MTA's implementation of course.
  11. eAi

    Server Hosts

    Bear in mind that you tend to get what you pay for.
  12. I see no real issue advertising server hosting companies, as long as it's a legitimate and buisness that provides a good service. Let's leave it at that - this clearly is an advertisement.
  13. eAi

    clearChatBox()

    Welcome - we've got lots of users from Poland here and your English seems pretty good! The chat box is, I think, on the boundary between what the user should have complete control over and what servers would like control over. It's a hard line to tread - you don't want servers to be able to annoy users by overriding the chatbox behaviour substantially. There's no real reason that I can think of that a server couldn't have a chatbox resource that replaces the standard one - I can't see why that wouldn't work. That seems a more practical route to go down, though providing script access to the user's chatbox settings might be desirable (or providing a generic way for scripts to give users options?)
  14. You will need your own page - callRemote doesn't use a standard way of making requests - it sends the arguments as the JSON-encoded body of a POST request, which isn't a conventional thing to do - but provides more flexibility than a GET request could.
  15. eAi

    MTA and SAMP

    Sugar, it seems your contributions to this thread have been more aggressive and inflammatory than most others'. We're happy for other people to discuss other mods as they wish on our forum, we just don't need people being aggressive, which is how your posts comes across. People can have and express opinions about MTA or other mods - they can say whatever they want, but they will be held to account for it. That's part of having an intelligent discussion. You state that SAMP is not-for-profit, when that's undeniably not the case. They may not be making a substantial amount of money, but that's beside the fact. MTA, and the vast majority of mods for all games do it for The Love alone. Whether that makes them better or worse mods is for the players to decide. MTA has at least it's history and originality on it's side, if nothing else. We'd like to think it has a friendly, open and welcoming community. We'd like to think it had all the features and the stability our players want. We'd like to think that being open source helps anyone who's interested get involved and contribute to improving MTA even further. Of course, all these things are subjective.
  16. eAi

    MTA and SAMP

    Even if you're a charity, most legal systems would consider you a business.
  17. eAi

    MTA and SAMP

    MTA has never compared itself to other specific mods, and isn't about to start doing so. That's petty and will cause other mods to hate MTA even more than they do already (quite why, nobody knows!) MTA owns a number of domains already which redirect to the site. The best way we can get more people noticing MTA is if people write about it on their sites or tell their friends about it.
  18. You can do whatever you want with MTA - it's a blank canvas. MTA can do almost anything any other GTA multiplayer mod can do.
  19. eAi

    Pawn and lua

    They're fairly different - but Lua is an easier language than Pawn - it's generally more forgiving. I'd follow the tutorials on the wiki to get a feel for it, but I reckon most people who have any experience programming in any language could pick up the basics of MTA scripting in a day or two.
  20. That wouldn't save any memory, but it's a good idea anyway.
  21. eAi

    MTA and SAMP

    It's obviously a competition - and that's no bad thing. That said, MTA (as in it's developers and QA team) has never been aggressive towards other mods, and MTA has certainly taken a lot of flack from developers of other mods over the years. Can you please keep the tone polite here - no more ****s, or telling people they aren't welcome here. This isn't your house either - you're just visiting like everyone else. Moderators and Developers get to chose who is welcome and who isn't.
  22. If you want to associate information with players, the official way to do that is setElementData and getElementData.
  23. eAi

    Im a idiot?

    A is definitely wrong. You've got the same script twice, not that that should matter. Remove the second script tag and the info tag - that's optional, then see what happens.
  24. eAi

    MTA:SA Bluescreen

    We don't support using MTA to make maps for other mods.
×
×
  • Create New...