Updated T6 AC GSC (#214)
* PlutoT6 AC GSC Updated PlutoT6's GSC modding capabilities changed, this allows us to bring the script on parity with the IW4x one. The following things changed: * Script no longer replaces stock GSC since custom GSC files are now supported. * The Script now captures the last time the client used his attack button; this is used to detect trigger bots. * Cleaned up the code a bit * Create README.MD Basic installation guide.
This commit is contained in:
parent
596272a3de
commit
8c5ff440db
35
GameFiles/PT6/README.MD
Normal file
35
GameFiles/PT6/README.MD
Normal file
@ -0,0 +1,35 @@
|
||||
# T6
|
||||
|
||||
This brings IW4M-Admins's Anti-cheat to Plutonium T6
|
||||
The following limitations are known:
|
||||
* Can't get the recoil from weapons fire; you have to disable this detection type manually.
|
||||
* in extreme cases it can produce false positives for Snap and Offset detection.
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
Move `_customcallbacks.gsc` to `%localappdata%\Plutonium\storage\t6\scripts\mp\`
|
||||
|
||||
Add this to the WeaponNameParserConfigurations List in the StatsPluginSettings.json file:
|
||||
|
||||
```
|
||||
{
|
||||
"Game": "T6",
|
||||
"Delimiters": [
|
||||
"_",
|
||||
"+"
|
||||
],
|
||||
"WeaponSuffix": "mp",
|
||||
"WeaponPrefix": null
|
||||
}
|
||||
```
|
||||
|
||||
Now create the following entry for __EVERY__ T6 server you are using this on in the ServerDetectionTypes list:
|
||||
|
||||
```
|
||||
"1270014976": [
|
||||
"Offset",
|
||||
"Strain",
|
||||
"Snap"
|
||||
]
|
||||
```
|
BIN
GameFiles/PT6/storage/t6/scripts/mp/_customcallbacks.gsc
Normal file
BIN
GameFiles/PT6/storage/t6/scripts/mp/_customcallbacks.gsc
Normal file
Binary file not shown.
@ -3,24 +3,6 @@
|
||||
#include common_scripts\utility;
|
||||
|
||||
init()
|
||||
{
|
||||
level.clientid = 0;
|
||||
level thread onplayerconnect();
|
||||
level thread IW4MA_init();
|
||||
}
|
||||
|
||||
onplayerconnect()
|
||||
{
|
||||
for ( ;; )
|
||||
{
|
||||
level waittill( "connecting", player );
|
||||
player.clientid = level.clientid;
|
||||
level.clientid++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IW4MA_init()
|
||||
{
|
||||
SetDvarIfUninitialized( "sv_customcallbacks", true );
|
||||
SetDvarIfUninitialized( "sv_framewaittime", 0.05 );
|
||||
@ -30,7 +12,7 @@ IW4MA_init()
|
||||
SetDvarIfUninitialized( "sv_printradar_updateinterval", 500 );
|
||||
SetDvarIfUninitialized( "sv_iw4madmin_url", "http://127.0.0.1:1624" );
|
||||
|
||||
level thread IW4MA_onPlayerConnect();
|
||||
level thread onPlayerConnect();
|
||||
if (getDvarInt("sv_printradarupdates") == 1)
|
||||
{
|
||||
level thread runRadarUpdates();
|
||||
@ -42,27 +24,26 @@ IW4MA_init()
|
||||
level.callbackPlayerDisconnect = ::Callback_PlayerDisconnect;
|
||||
}
|
||||
|
||||
//Does not exist in T6
|
||||
//It's called slightly different in T6
|
||||
//set_dvar_if_unset(dvar, val, reset)
|
||||
SetDvarIfUninitialized(dvar, val)
|
||||
{
|
||||
curval = getDvar(dvar);
|
||||
if (curval == "")
|
||||
SetDvar(dvar,val);
|
||||
set_dvar_if_unset(dvar,val);
|
||||
}
|
||||
|
||||
IW4MA_onPlayerConnect( player )
|
||||
onPlayerConnect( player )
|
||||
{
|
||||
for( ;; )
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
player thread waitForFrameThread();
|
||||
//player thread waitForAttack();
|
||||
player thread waitForAttack();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Does not work in T6
|
||||
/*waitForAttack()
|
||||
//Got added to T6 on April 2020
|
||||
waitForAttack()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
@ -75,7 +56,7 @@ IW4MA_onPlayerConnect( player )
|
||||
|
||||
self.lastAttackTime = getTime();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
runRadarUpdates()
|
||||
{
|
||||
@ -209,7 +190,7 @@ waitForAdditionalAngles( logString, beforeFrameCount, afterFrameCount )
|
||||
i++;
|
||||
}
|
||||
|
||||
lastAttack = 100;//int(getTime()) - int(self.lastAttackTime);
|
||||
lastAttack = int(getTime()) - int(self.lastAttackTime);
|
||||
isAlive = isAlive(self);
|
||||
|
||||
logPrint(logString + ";" + anglesStr + ";" + isAlive + ";" + lastAttack + "\n" );
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user