10.06.2011, 12:05
[Tool/Web/Other] remote-jacking anticheat (also detects people controlling remote cars issue)
10.06.2011, 16:30
Lol, a tutorial IS something you explain and how to do it ... so this is not a tut. Like alpha500delta says:
10.06.2011, 20:51
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.
And if you can't figure out what this is, you don't need it.
10.06.2011, 20:57
10.06.2011, 20:59
11.06.2011, 11:55
11.06.2011, 14:38
Quote:



12.06.2011, 06:47
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?
Or? Where the hell is this enum created?
Really nice snippet afterall.
People should get errors if they use this code!
acstruct?
pawn Code:
enum E_ACSTRUCT
{
//DATA
}
new acstruct[MAX_PLAYERS][E_ACSTRUCT];
Really nice snippet afterall.
13.09.2011, 07:33
Quote:
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:
Really nice snippet afterall. |
19.10.2011, 06:48
What is Distance(); ? Code plz.
02.05.2012, 01:48
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
06.05.2012, 21:04
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.
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.
27.06.2012, 07:53
Quote:
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. |
Like i wrote in first post:
Quote:
Feel free to post comments, optimizations, improvements. |
27.06.2012, 15:07
Good Work =]
13.07.2012, 00:16
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;
}
}
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 );
24.07.2012, 23:53
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)