Jump to content

DiSaMe

Helpers
  • Posts

    1,461
  • Joined

  • Last visited

  • Days Won

    34

DiSaMe last won the day on March 31

DiSaMe had the most liked content!

Member Title

  • Forum Helper

Recent Profile Visitors

20,189 profile views

DiSaMe's Achievements

Loc

Loc (38/54)

127

Reputation

  1. If they manage to bypass the client-side anti-cheat, I don't think it makes a difference whether they do those things by calling Lua functions or without using Lua at all. All that matters is that they manipulate some data that the server relies on clients to tell. To detect suspicious movement - yes, as I said, you can track player position, by calling getElementPosition repeatedly and checking how much the value has changed since the last time you checked. Or velocity too, for that matter. The thing is that if you only check velocity but not position, they'll still be able to evade detection by teleporting (since teleporting only changes the position) or by faking the velocity values they send to the server. When a cheater is the syncer of a vehicle, they can manipulate that vehicle, regardless if they're driving it or not. So they'll be able to make some driverless vehicles fly around, which you can detect on the server using getElementPosition and getElementVelocity and find the player syncing it using getElementSyncer. Understandably, it's going to be less evident when no one's in the car that's flying around. But they shouldn't be able to affect vehicles that are being synced by other players, which includes all vehicles driven by other players. Whether the same applies to vehicle damage - I'm not sure. I remember shooting the fuel tank of a vehicle driven by another player, and it exploded. That was a lucky shot, it was moving quite fast, and I hit the fuel tank from my point of view, but I doubt it was the same from their point of view. It's as if there's some "fuel tank explosion" signal that the server accepts regardless of who's the syncer. But it happened long ago (2008 or 2009 I think).
  2. There's no way to block client-side changes that can't be circumvented, but script security should not rely on that in the first place. The server-side script should not blindly accept whatever events it receives from the client. With physics, it gets tricky. The server doesn't have physics so it has to rely on players to tell their own positions and positions of other elements that they're syncing. Usually the solution to speed hacks is to track the player position to detect if they're moving in a way that's impossible with the game's physics. But distinguishing that is not always easy so this won't fully solve the problem. The foolproof solution is to implement physics on the server, but that's a lot of work and the server will have to do much more processing. But I'm not sure what you mean by "explode cars of other players". The vehicle is synced by its driver, if there's any, so other players should not be able to control the damage (probably, I'm not certain about how it works).
  3. What did you try? It may help if you gave more info since we may be able to tell why it didn't work. You can call createEffect to create a particle-emitting element and attach it to Hydra using attachElements. But I don't know if there's an effect for red smoke. Another option is to call fxCreateParticle repeatedly, in short intervals. This one is more flexible (you can customize colors and other parameters) so you can make smoke of whatever color you want. For position, you can use getElementPosition if placing the smoke at the center of Hydra is enough for you, or getElementMatrix with some calculations if you want to put it at some offset relative to Hydra.
  4. toggleAllControls won't work on anything but players. It doesn't even make sense for anything but players, because it disables specifically inputs done manually - setControlState (or setPedControlState on localPlayer) even works if the controls are disabled for local player. The proper solution is not making them attack in the first place. It is the script that sets the control states, so it should set them to false and keep them that way.
  5. I'm not aware of anything specific to Kali Linux, but there's a wiki page for playing on Linux in general: Client_on_Linux_Manual. Perhaps the most important parts are that you need to use 32-bit Wine prefix and install the 3 fonts. Regarding servers, I haven't used MTA for online play for a long time so I don't know what it is like these days, but according to Anti-cheat_guide, the anti-cheat detects when you use Wine. So a server can disallow it, but it's allowed by default.
  6. I can somewhat relate to you, but it's a little different. I don't have any specific plans for MTA at the moment, but I also have thoughts on single player vs multi player occasionally. It's nice to have your own server, but the idea of using MTA as a scripting engine for single player is also very attractive. When I ran a server many years ago, it had NPCs, but they didn't do much, and the server wasn't popular enough to become heavy on hardware, so my laptop was able to handle it without problems. Having NPCs walking and driving around all over the game world with lots of players in the server, would be much more demanding. My suggestion is to make your own NPC system, with custom sync and all, although it's going to be a challenge. For example, you can start with client-only NPCs, with scripted movement that overrides the game's physics (like setElementPosition/setElementVelocity in onClientPreRender or a timer with short intervals). Every client generates and moves the NPCs based on values of random seed and time. This way, you can get all players to see the same thing, just by having the server sync those values (you'll need a custom random number generator because Lua's math.random isn't guaranteed to produce the same values between players). Then you'll likely want to allow player interaction with NPCs. If a player crashes a vehicle into NPC's vehicle, you'll need to stop overriding the position, destroy the client-side NPC and create a server-side one, allowing the game's built-in physics and MTA's built-in sync to take over so everyone would see the NPC's vehicle being pushed and otherwise affected by collision. It's a lot of work, but it can make multiplayer with NPCs around the map feasible.
  7. DiSaMe

    Goodbye MTA

    I never got to know you, but it's sad to see someone leave MTA. But I have "left MTA" long ago and I still visit here all the time, so leaving doesn't have to be what it looks like. Your post serves as a wake-up call reminding me that I should find some time to script on MTA for once. Whatever path in the life you're taking, I hope it's for the better
  8. MTA doesn't save the domain names? Didn't know that. I agree, it can be a problem. When I ran my own server many years ago, I wasn't sure if my IP address could change so I used a domain for this purpose. If the address changes, the domain can still serve as unchanging reference. If MTA only remembers the IP address, that doesn't eliminate all advantages of domains, but still does make the change of address a bigger inconvenience than it should be.
  9. When you set the property, it stays frozen. So for example if you call getWorldProperty and then pass its return value to setWorldProperty, that value will stay until you call resetWorldProperty. But some of those functions (including getSkyGradient) are limited because they can only return the values previously assigned by script - meaning you can't get the unmodified value and assign it to freeze it. It seems that smooth transition is possible for color filter, because getColorFilter has isOriginal argument, allowing you to take the values that would be there if they weren't overridden by script so you can know exactly what values to interpolate to. But it doesn't help much when the same can't be done to other parameters.
  10. There are several functions for controlling the relevant properties, such as setSkyGradient, setWorldProperty and setColorFilter. But this seems like such a hacky way to do it that I'm not even sure if it can even be done properly, because lighting is not just time-dependent, it's weather-dependent too. So even if you freeze the lighting, it's going to switch suddenly (from old weather to new weather) when you unfreeze it. A more reliable solution is to take full control of those properties, completely overriding the built-in weather and implementing your own weather system. I've had this idea in the days before it was possible in MTA (because MTA didn't have all those functions), but it may be an overkill, depending on your needs.
  11. You can make your own functions that operate in terms of your custom concepts, and use dxDrawRectangle/dxDrawText under the hood for actual drawing. An example: function getCoords(coordSys, x, y) if coordSys then x, y = coordSys.x+x, coordSys.y+y end return x, y end function makeCoordSystem(parent, x, y) local finalX, finalY = getCoords(parent, x, y) return { x = finalX, y = finalY } end function drawText(coordSys, text, x, y) local finalX, finalY = getCoords(coordSys, x, y) dxDrawText(text, finalX, finalY) end function drawRectangle(coordSys, x, y, width, height, color) local finalX, finalY = getCoords(coordSys, x, y) dxDrawRectangle(finalX, finalY, width, height, color) end This implements a concept of coordinate system, the coordinate offset described by table with keys x and y. With this, you can do: local onScreenHud = makeCoordSystem(false, x*1200, y*120) -- false means onScreenHud will be placed in absolute coordinates function drawHUD() drawRectangle(onScreenHud, 0, 0, x*1400, y*400, tocolor(0, 0, 0, 150)) drawText(onScreenHud, "Text", x*20, y*10) end Since makeCoordSystem has parent as first argument, even coordinate systems themselves can be positioned with respect to other coordinate systems: local someInnerHud = makeCoordSystem(onScreenHud, x*20, x*40) function drawInnerHUD() drawText(someInnerHud, "Text in the inner HUD", x*20, y*10) end It's all about coming up with the right abstractions. As an example, you could modify this to add width and height properties to coordinate systems, and use them in calculations so you wouldn't have to write x* and y* everywhere.
  12. I thought there was a setting for auto-updates, until I checked to find out it only allows choosing between stable and nightly. Too bad. But doesn't auto-update ask for confirmation? I can remember MTA asking if I want to update or not. Although it's probably just some old memories, and even then, having to reject every time would be inconvenient. I haven't used MTA in a connected environment for quite some time so I haven't been aware of how it works. Auto-updates in MTA have never been a problem personally for me, but I agree with all your points. The reason I got so hooked on MTA is the freedom it gives. It was mostly about creative freedom, but that's just a part of it. I've seen MTA receive undeserved hate because of things it does right, like disabling glitches by default and allowing to enable them on a per-server basis. So it stands out when MTA, while otherwise being the best multiplayer at giving freedom, actively limits the freedom like that. You're right about local play. While it's a great thing to be able to play with hundreds of other players over the Internet, I don't like the idea that multiplayer must revolve around online play. Playing locally is just as valuable, even solo - with MTA's scripting capabilities, playing alone can make as much sense as playing with others (funny because I probably spent most time in MTA alone, although I was scripting rather than merely playing, so it doesn't count). I don't like living in the so-called "modern world" of "smart" devices and apps and some other crap where you're supposed to be part of a whole and blindly accept whatever they shove your way. If they want, they can make the software stop working the way it was working, and you will no longer be able to do what you used to do. I prefer being in control of what happens on my devices. With stuff like CrowdStrike incident happening not so long ago, I thought people would understand why someone would not want automatic updates. Well noticed regarding the <min_client_version> parameter. It's contradictory to have a parameter that allows or disallows the players to do something that they're not allowed to do anyway. But I can see a problem with making updates optional - even if the choice was added to the new versions, you still wouldn't be able to choose versions prior to that (because the earlier versions would still auto-update), unless those earlier versions were also updated to add the choice. With MTA being open source, you can compile older versions yourself and otherwise suit it for your own needs, so ultimately it does leave it up to you to choose, but compiling just to disable auto-updates is an overkill. Sorry, but you got it backwards. It doesn't make sense to require justification not for imposing limitations.
  13. Hey, I never used to be interested in GTA3/VC versions of MTA. Their popularity must have already been in demise when I joined this community. I only got seriously involved in MTA after MTA SA DM DP1 was released, because of endless scripting capabilities it offered. Most of the time I spent in MTA SA, I did so alone, scripting in my own local server. And even though there were moments I enjoyed playing on other servers, that was usually because they, too, made use of those scripting capabilities. So it's easy to understand why earlier MTA versions didn't catch my interest. However, it's a bit of a sad realization that MTA for GTA3 and VC has been forgotten for the most part. I mean that's where it all started. Sometimes I wish I had been there to experience this greatness in its early days (but I didn't even have the internet connection back then). And because of that, it's nice to see that you guys are still working on it. Still keeping roots of MTA alive - great job! I wish the current MTA supported GTA 3 and VC the way it supports SA - from what I read on other topics, that's how it was initially intended to be. But it's easier said than done.
  14. Downloading the missing files from https://packages.debian.org works for me. At least it did when I tried, which was the last year (maybe even this year too, can't remember). In addition, I don't install them into the system - I put them into some directory and run the server with environment variable LD_LIBRARY_PATH=path/to/directory instead. So even if not a "proper" solution, it doesn't mess with system directories.
  15. setWeaponProperty can change the damage property, but it will affect all players. To change the amount of damage done by individual players, you can detect the damage using onClientPedDamage and onClientVehicleDamage and calling setElementHealth to reduce the health further, and you may also want to call killPed if the adjusted health gets to 0 or lower, in order to attribute the kill to the attacking player.
×
×
  • Create New...