Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
alpha500delta - 10.06.2011
Quote:
Originally Posted by linuxthefish
It shouldn't need to be explained.
|
Then it's not really a tutorial is it... Then it would be more like a snippet.
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Michael@Belgium - 10.06.2011
Quote:
Originally Posted by linuxthefish
It shouldn't need to be explained.
|
Lol, a tutorial IS something you explain and how to do it ... so this is not a tut. Like alpha500delta says:
Quote:
Originally Posted by alpha500delta
Then it's not really a tutorial is it... Then it would be more like a snippet.
|
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Mike Garber - 10.06.2011
If you notice this is not titled as a tutorial in any way, although i think the placement of this topic is to get as much attention as possible.
And if you can't figure out what this is, you don't need it.
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
LZLo - 10.06.2011
Quote:
Originally Posted by Basicz
Hmm... like when we cannot jack or enter a car from a far distance, ( Player 1 is driving on San Fierro HQ, then player 2 comes and pressed "G" then the car moves a bit far from player 2, magically player 2 gets in the car )
|
oh, nice work
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Mike Garber - 10.06.2011
Quote:
Originally Posted by Basicz
Hmm... like when we cannot jack or enter a car from a far distance, ( Player 1 is driving on San Fierro HQ, then player 2 comes and pressed "G" then the car moves a bit far from player 2, magically player 2 gets in the car )
|
No, nothing like that.
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Basicz - 11.06.2011
This! Found this with ****** search.
http://fooyoh.com/car_video/watch/cRCRC44InfE
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Michael@Belgium - 11.06.2011
Quote:
Originally Posted by Basicz
|
Aaaah

finally !!!>

Thank you so much Basicz
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Lorenc_ - 12.06.2011
Wait lol, I don't see no Enum created for this and supplied in this tutorial.
People should get errors if they use this code!
acstruct?
pawn Code:
enum E_ACSTRUCT
{
//DATA
}
new acstruct[MAX_PLAYERS][E_ACSTRUCT];
Or? Where the hell is this enum created?
Really nice snippet afterall.
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
JernejL - 13.09.2011
Quote:
Originally Posted by Lorenc_
Wait lol, I don't see no Enum created for this and supplied in this tutorial.
People should get errors if they use this code!
acstruct?
pawn Code:
enum E_ACSTRUCT { //DATA } new acstruct[MAX_PLAYERS][E_ACSTRUCT];
Or? Where the hell is this enum created?
Really nice snippet afterall.
|
I didn't post the enum, because there's a lot more info in it that i don't want it seen public, but it is very easy to recreate it from the sources that i did show.
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
RAEN - 19.10.2011
What is Distance(); ? Code plz.
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Kar - 02.05.2012
I don't understand, lastantijackstate and currstate is this really surpose to be vehicleid? Because you use GetPlayerVehicleID after and the name is straying a bit
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
decondelite - 06.05.2012
I've just discovered that code snippet, thanks to a thread that I posted about a hack, and that got deleted...
I'd like to say that it's FAR from being well optimized, and that I've modified everything to get something much simpler out of it.
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
JernejL - 27.06.2012
Quote:
Originally Posted by decondelite
I've just discovered that code snippet, thanks to a thread that I posted about a hack, and that got deleted...
I'd like to say that it's FAR from being well optimized, and that I've modified everything to get something much simpler out of it.
|
If you are going to bash my code here you are free to do so, but i expect you to post your "well optimized, simplier and modified everything" for everyone else, because otherwise you just look like a egocentric basher that's affraid of sharing and others criticizing his own code.
Like i wrote in first post:
Quote:
Feel free to post comments, optimizations, improvements.
|
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
cJMaster_ - 27.06.2012
Good Work =]
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Lorenc_ - 13.07.2012
pawn Code:
enum E_CARJACK_DATA
{
Float: E_LAST_X, Float: E_LAST_Y, Float: E_LAST_Z,
E_LAST_VEH
}
new
g_carjackData[ MAX_PLAYERS ] [ E_CARJACK_DATA ]
;
stock CheckPlayerRemoteJacking( playerid )
{
new iVehicle = GetPlayerVehicleID( playerid );
if( !IsPlayerInAnyVehicle( playerid ) )
GetPlayerPos( playerid, g_carjackData[ playerid ] [ E_LAST_X ], g_carjackData[ playerid ] [ E_LAST_Y ], g_carjackData[ playerid ] [ E_LAST_Z ] );
if( ( iVehicle != g_carjackData[ playerid ] [ E_LAST_VEH ] ) && ( iVehicle != 0 ) && ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) )
{
new
Float: fDistance = GetVehicleDistanceFromPoint( iVehicle, g_carjackData[ playerid ] [ E_LAST_X ], g_carjackData[ playerid ] [ E_LAST_Y ], g_carjackData[ playerid ] [ E_LAST_Z ] ),
Float: fOffset = 10.0
;
if( ( GetVehicleModel( iVehicle ) == 577 ) || ( GetVehicleModel( iVehicle ) == 592 )) fOffset = 25.0; // Andromanda | AT-400
if( fDistance > fOffset) {
/*
INSERT WHAT YOU WANT TO DO TO A CAR JACKER HERE!
WARNING: THIS IS NOT ACCURATE IMHO!
*/
SendClientMessage( playerid, -1, "Y U TRY TO CAR JACK" );
}
GetPlayerPos( playerid, g_carjackData[ playerid ] [ E_LAST_X ], g_carjackData[ playerid ] [ E_LAST_Y ], g_carjackData[ playerid ] [ E_LAST_Z ] );
g_carjackData[ playerid ] [ E_LAST_VEH ] = iVehicle;
}
}
I optimized it a bit, but didn't test it.
Installation of my code:
- Add the enum and variable declarations at the top underneath your includes.
- Place the function wherever you want. (stock CheckPlayerRemoteJacking) Just not inside a function...
- Go to OnPlayerUpdate and insert CheckPlayerRemoteJacking( playerid );
If my method doesn't work, please inform me by PM because I'm not sure if I'll be looking at this thread every day!
Re: remote-jacking anticheat (also detects people controlling remote cars issue) -
Lorenc_ - 24.07.2012
Quote:
Originally Posted by Kwarde
Then I think you should test it before posting it (@Lorenc_). I think this is mentioned a couple of times before ('least in other topics) where you was in too (not sure) so you should know that :').
|
I tested it and was quite happy to announce that it worked :P