SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 31/08/2012, 02:07 PM   #1
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,800
Reputation: 1160
Default [WIP] Vehicle_Sync - Stop vehicle teleportation.

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 Code:
native IsVehicleOccupied( vehicleid );
native SetVehicleSyncDebug( debug_mode = DEBUG_MODE_BASIC );
native SetVehicleSyncTickRate( tick_rate = 200 );

IsVehicleOccupied( vehicleid )
- 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.
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
Old 31/08/2012, 03:11 PM   #2
Cypress
Gangsta
 
Cypress's Avatar
 
Join Date: Dec 2009
Location: Germany
Posts: 938
Reputation: 127
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

Nice work here. What if a vehicle will fall from a mountain? Does it getting respawned?
__________________

Welcome stranger. I like your attitude.
Cypress is offline   Reply With Quote
Old 31/08/2012, 03:12 PM   #3
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,800
Reputation: 1160
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

It could get respawned.
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
Old 31/08/2012, 03:28 PM   #4
Sanady
High-roller
 
Sanady's Avatar
 
Join Date: May 2012
Location: Los Santos
Posts: 1,177
Reputation: 132
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

Pretty nice for big community.Which have a lot of players...
__________________

Sanady is offline   Reply With Quote
Old 31/08/2012, 04:08 PM   #5
Mark™
High-roller
 
Mark™'s Avatar
 
Join Date: Apr 2011
Location: dXJtb20=
Posts: 1,836
Reputation: 512
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

Quote:
Originally Posted by Lorenc_ View Post

First and foremost. Kye, please disable CLEO.
I don't think he would. That's what he said, when someone suggested him to block CLEO completely.
Mark™ is offline   Reply With Quote
Old 31/08/2012, 04:33 PM   #6
Glint
Guest
 
Posts: n/a
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

Quote:
Originally Posted by Xtreme_playa View Post
I don't think he would. That's what he said, when someone suggested him to block CLEO completely.
Yeah same opinion here i don't think he will disable it.

OT Nice job mate.
  Reply With Quote
Old 31/08/2012, 06:26 PM   #7
Niko_boy
High-roller
 
Niko_boy's Avatar
 
Join Date: Aug 2010
Location: Somewhere i belong
Posts: 1,338
Reputation: 138
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

k so here we go again
great work
__________________
nope[IMG]http://*******/1r0SOkH_[/IMG]
•••[CLOSED]LCS•Freeroam•DM•Stunts•••AutoArena [0.3z][No SkinShot][sixtytiger.com]Want a decent Attack Defend Gamemode?
N/A176.31.229.148:7830Get This! Attack-Defend(v2.3.1)
Niko_boy is offline   Reply With Quote
Old 01/09/2012, 01:06 AM   #8
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,800
Reputation: 1160
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

Quote:
Originally Posted by Xtreme_playa View Post
I don't think he would. That's what he said, when someone suggested him to block CLEO completely.
Sobiet's NOP + CLEO = Fucked up server. Did he ever realize anything about that...

It should be toggled by the server operator.
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
Old 01/09/2012, 03:52 AM   #9
Johnson_Brooks
Huge Clucker
 
Join Date: Aug 2012
Location: USA/NewYork/Whitestone
Posts: 296
Reputation: 7
Cool Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

Quote:
Originally Posted by Lorenc_ View Post
Sobiet's NOP + CLEO = Fucked up server. Did he ever realize anything about that...

It should be toggled by the server operator.
+1 for that.
The server owner should choose if he wants/does not wants his players to use cleo mods
But i dont think we can't stop those who use s0b3it
Johnson_Brooks is offline   Reply With Quote
Old 02/09/2012, 07:13 AM   #10
NaBeeL[NxT]
Big Clucker
 
NaBeeL[NxT]'s Avatar
 
Join Date: Aug 2012
Location: India-Mumbia
Posts: 66
Reputation: 6
Default Re: [WIP] Vehicle_Sync - Stop vehicle teleportation.

nice
__________________
Im A Forum Maker,MTA Editor And Scripter
Visit On my Website of BlackTurbo's Server
Click Here


♥♥♥♥........♥♥♥.......♥♥♥........♥♥♥♥♥♥♥♥♥ …….♥#########♥ Ƹ̵̡Ӝ̵̨̄Ʒ ♥─╬╬╬ஜఋ ఋஜ╬╬╬─♥ Ƹ̵̡Ӝ̵̨̄ƷI love Scripting
NaBeeL[NxT] is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Question] stop vehicle mickos Scripting Help 12 09/06/2012 11:31 AM
Stop Vehicle nutzkung69 Scripting Help 0 11/03/2012 11:42 AM
How To - Stop Entering Vehicle While Surfing Bug StrickenKid Help Archive 12 24/02/2010 05:46 PM


All times are GMT. The time now is 11:58 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.