diff --git a/pawno/include/anticheat/hooks.inc b/pawno/include/anticheat/hooks.inc index 296732f..390a8b7 100644 --- a/pawno/include/anticheat/hooks.inc +++ b/pawno/include/anticheat/hooks.inc @@ -85,22 +85,24 @@ hook OnPlayerConnect( playerid ) hook OnPlayerSpawn( playerid ) { - // General - p_acSpawned{ playerid } = true; - // Weapon Hack - for ( new i = 0; i < 3; i++ ) - { + for ( new i = 0; i < 3; i++ ) { new 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_PlayerWeaponUpdateTime[ playerid ] = GetTickCount( ) + 2000; + // Airbrake p_abDetected{ playerid } = 0; p_abLastTick[ playerid ] = GetTickCount( ) + 3000; + + // General + p_acSpawned{ playerid } = true; return 1; } diff --git a/pawno/include/anticheat/player.inc b/pawno/include/anticheat/player.inc index e5d131b..6532d7e 100644 --- a/pawno/include/anticheat/player.inc +++ b/pawno/include/anticheat/player.inc @@ -52,6 +52,8 @@ new bool: p_PlayerHasWeapon [ MAX_PLAYERS ] [ AC_MAX_WEAPONS char ], //p_PlayerWeaponUpdateTime [ MAX_PLAYERS ], p_SelectedClassID [ MAX_PLAYERS ], + p_PlayerWeaponUpdateTime [ MAX_PLAYERS ], + p_CurrentArmedWeapon [ MAX_PLAYERS char ], // Spectating //bool: p_SpectatePermission [ MAX_PLAYERS char ], diff --git a/pawno/include/anticheat/weapon.inc b/pawno/include/anticheat/weapon.inc index dbbb97c..fe1a8ca 100644 --- a/pawno/include/anticheat/weapon.inc +++ b/pawno/include/anticheat/weapon.inc @@ -28,11 +28,6 @@ #include < anticheat\global > #include < anticheat\player > -// Player Variables - -static p_PlayerWeaponUpdateTime[ MAX_PLAYERS ]; -static p_CurrentArmedWeapon[ MAX_PLAYERS char ]; - // Function Hook (GivePlayerWeapon) stock AC_GivePlayerWeapon( playerid, weaponid, ammo )