anticheat fixes

This commit is contained in:
Lorenc Pekaj 2018-07-06 09:51:22 +10:00
parent b68a72fe1c
commit 82f2a19856
3 changed files with 10 additions and 11 deletions

View File

@ -85,22 +85,24 @@ hook OnPlayerConnect( playerid )
hook OnPlayerSpawn( playerid ) hook OnPlayerSpawn( playerid )
{ {
// General
p_acSpawned{ playerid } = true;
// Weapon Hack // Weapon Hack
for ( new i = 0; i < 3; i++ ) for ( new i = 0; i < 3; i++ ) {
{
new new
weaponid = mAvailableSpawns[ p_SelectedClassID[ playerid ] ] [ E_WEAPONS ] [ i ]; weaponid = mAvailableSpawns[ p_SelectedClassID[ playerid ] ] [ E_WEAPONS ] [ i ];
if( weaponid != -1 && weaponid < AC_MAX_WEAPONS ) if( weaponid != -1 && weaponid < AC_MAX_WEAPONS ) {
p_PlayerHasWeapon[ playerid ] { weaponid } = true; p_PlayerHasWeapon[ playerid ] { weaponid } = true;
} }
}
p_PlayerWeaponUpdateTime[ playerid ] = GetTickCount( ) + 2000;
// Airbrake // Airbrake
p_abDetected{ playerid } = 0; p_abDetected{ playerid } = 0;
p_abLastTick[ playerid ] = GetTickCount( ) + 3000; p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
// General
p_acSpawned{ playerid } = true;
return 1; return 1;
} }

View File

@ -52,6 +52,8 @@ new
bool: p_PlayerHasWeapon [ MAX_PLAYERS ] [ AC_MAX_WEAPONS char ], bool: p_PlayerHasWeapon [ MAX_PLAYERS ] [ AC_MAX_WEAPONS char ],
//p_PlayerWeaponUpdateTime [ MAX_PLAYERS ], //p_PlayerWeaponUpdateTime [ MAX_PLAYERS ],
p_SelectedClassID [ MAX_PLAYERS ], p_SelectedClassID [ MAX_PLAYERS ],
p_PlayerWeaponUpdateTime [ MAX_PLAYERS ],
p_CurrentArmedWeapon [ MAX_PLAYERS char ],
// Spectating // Spectating
//bool: p_SpectatePermission [ MAX_PLAYERS char ], //bool: p_SpectatePermission [ MAX_PLAYERS char ],

View File

@ -28,11 +28,6 @@
#include < anticheat\global > #include < anticheat\global >
#include < anticheat\player > #include < anticheat\player >
// Player Variables
static p_PlayerWeaponUpdateTime[ MAX_PLAYERS ];
static p_CurrentArmedWeapon[ MAX_PLAYERS char ];
// Function Hook (GivePlayerWeapon) // Function Hook (GivePlayerWeapon)
stock AC_GivePlayerWeapon( playerid, weaponid, ammo ) stock AC_GivePlayerWeapon( playerid, weaponid, ammo )