[Include] Anti-Vehicle Spawner
#1

Scrapped old versions and have fully rewritten the code. Let me introduce you to the new #AVT which will disable vehicle warp hack / teleport, car spam and car rains. Inspiration raised due to problems occurring in servers I own.

Now tests have been made and few updates implemented again.

Two callbacks can be processed:
Код:
/* Do not ban through this as innocent players will get reported as well; */
forward OnAntiCheatVehicleWarp(playerid, vehicleid);

/* This one is called when player does not go through OnPlayerEnterVehicle; */
forward OnAntiCheatVehicleWarpInto(playerid, vehicleid);
Positives:
  • This include will automatically revert vehicle position changes - made by our enemies;
  • Uses _ALS_ hooking method;
  • No timers involved as of yet;
  • Trailing support - only when appropriate server functions are used;
  • Vehicle push support;
  • Now supports cases when player leaves a moving vehicle;
  • Detection of warping into vehicles.
Downsides:
  • Will not detect if warped vehicle is really close to the hacker "range < 10.0";
  • The system can be bypassed when hacker uses sa-mp client hack patches, but changes are purely client sided so it will have no effect on other players. In these cases, reverts will be made as soon as hacker disables those patches; (Tested)
  • Vehicle Trailer Attachment does not work via other scripts other than GameMode;
  • PutPlayerInVehicle should be avoided via filterscripts.
Installation
Код:
Save the document from pastebin;
Place it under pawno\includes folder;
Rename it to "avt".inc;
Add to your script "#include <avt>" BEFORE any other include other than a_samp or fixes;
Compile your script;
Код:
Update v3.2
Minor fixes and improvements;
Added support to allow vehicle creation via filterscritpts / plugins.
PASTEBIN LINK
Reply
#2

Nice script. +rep

This will inform to admins if a player spawn vehicles ?
Reply
#3

Edit:
Not supported by new update.
Reply
#4

ok ty
Reply
#5

An update has been made leaving include as "Plug and Play" compatible
Reply
#6

You can't spawn a vehicle by yourself, the most common cheats just teleport vehicles to one location.
Reply
#7

I was able to test it until I added SetVehiclePos hook, I guarantee it is working and it Also detects Mass Spawn with the same code structure. It will be still safe if vehicle will be towed away as OnUnoccupiedVehicleUpdate is hooked as well.
And what did you mean - to one location. Vehicle still will be detected and resestted to original position if vehicle streams in for any player, that's why the detection of player is not 100% but reset of vehicle is.
Or maybe you just did not get what this is for - Anti-cheat which prevents players/cheaters to teleport vehicles to themselves.

Edit:
Made an update where literal spawn / unknown vehicle usage detection is implemented. Also some code improvements are included.
Reply
#8

Nice work.
I'm going to give this a test on Las Venturas Playground
Reply
#9

Nice Script
Reply
#10

You do not filter server actors, my bots all end up under the field at 0,0,0
Reply
#11

That should not happen unless you got some warnings when compiling. SetVehiclePos is hooked and PutPlayerInVehicle too.. if teleports works for player I cannot see the problem.
Anyway updated with attempt to fix your problem by adding !IsPlayerNPC in some callbacks.
Reply
#12

not really a bug but you should not use the name avs there is already a release with that name.

besides that good work!
Reply
#13

Код:
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(240) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(240) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(240) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(241) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(241) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(241) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(241) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(242) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(242) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(242) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(242) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(243) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(243) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(243) : warning 213: tag mismatch
D:\xfolder(2)\samp03\samp3e-R7-3\pawno\include\avs.inc(243) : warning 213: tag mismatch
i now get this error with 2.6
Reply
#14

Thanks, fixed that little mistake. That AVS is with capital letters thought.
Reply
#15

I don't see the point of the Anti Vehicle Spawner. As far I know, you cannot spawn vehicles in SA-MP client side because vehicles are server side.
By the way, I like the Anti mass vehicle.
Reply
#16

I involved anti-spawner in later versions due ******* video, the first anti-thing was agains cheaters who teleports vehicles to themselves in game therefore it also protects server agains vehicle-mass-teleports.
Reply
#17

Nice
Reply
#18

Compiles great now thank you
Reply
#19

Nice work.
Reply
#20

[MAX_VEHICLES char]

what?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)