31.08.2012, 13:07
Vehicle_Sync Plugin
First and foremost. Kye, please disable CLEO. Sorry for deleting my old thread. I felt it looked to unorganized and just looked pretty bad as my first plugin... Anyway, I promised a revamp, here it is.Information
I made this plugin so that vehicles within my server are not spammed everywhere with hacks such as sobiet. This has a system where it tracks the vehicles' updated position, and if the vehicle suddenly is 15m away from it's last updated; it will respawn the vehicle.
It now has no bugs as far as I know, works MUCH better than more, and for everyone. Unseemly, the lag created with car spawning and other tools seems to only take effect on the hacker's client. Not sure why though, but it's a great thing.
Still don't understand, well find out yourself. Just get some tool that will bring a vehicle to you
Changelog
* Not using OnUnoccupiedVehicleUpdate
* The steep hill/or car pushing method of getting the vehicle to respawn now has a patch (It works 95% on most San Andreas roads. For this case, San Fierro).
* I've started to use the 'unordered_set' library which is pretty damn useful and much better than looping straight off a number.
* Makefile included, hopefully it shall work with people that are willing to compile with linux.
* Debug modes added, obtain more information with some modes.
* You can change the tick rate of the plugin with a function!
Natives
pawn Код:
native IsVehicleOccupied( vehicleid );
native SetVehicleSyncDebug( debug_mode = DEBUG_MODE_BASIC );
native SetVehicleSyncTickRate( tick_rate = 200 );
- vehicleid (The specific vehicle id you are willing to check).
- Returns true if occupied.
SetVehicleSyncDebug( debug_mode )
- debug_mode
--- DEBUG_MODE_OFF -> Turns off debug mode.
--- DEBUG_MODE_BASIC -> Prints messages once a vehicle is respawned or if the tickrate is changed.
--- DEBUG_MODE_FULL -> Prints messages once a vehicle is respawned, updated by velocity or by the movement down a steep road/hill.
- Returns true;
SetVehicleSyncTickRate( tick_rate )
- tick_rate
--- The tick rate modifies the speed of the detection. It is on 200ms by default.
- Returns false if the tick_rate is under 1 otherwise; true.
Credits
Gamer_Z - SAMPGDK, makefile and helping me learn from his sources.
iggy1 - Helping me out from the start with setting the GDK up.
Emran - Testing with me.
Download
Version 0.1 - .dll + includes + source + makefile
Compile us a linux version!
Please compile if you can on Linux, preferably CentOS as I can test it finely on my server. I will credit you, of course.
Bugs
If you've found any bugs, please note them in the thread, as at least check this thread once a day.