User Tag List

Page 7 of 7 FirstFirst ... 567
Results 61 to 67 of 67

Thread: Cyanide

  1. #61
    Rampage Crsk's Avatar
    Join Date
    Nov 2011
    Location
    I'm out
    Posts
    323
    Country:
    Quote Originally Posted by SAM View Post
    @Crsk

    The audio file or whatever it is, is in the wrong format for linux clients. Is there a need to play some audio?
    apparenty there is no need in play the audio to kick CV rats and avoid ML snakes, but i love the effect so i'll try to let it work. also the cv is kicking at the first call and should be at the second (disabling the first call, of course), and the screen message in the first attempt of ML or CV osn't working too... -.-

    why you said that? what is the correct format for linux clients? idk if they needs a different file specification than uax 22050 k, but i think they can't hear because of replication fail.

    if you try the mutator offline you may see no problem with it.

    There is a problem between server-client comunication, if i'm an ape at coding, i'm a full ape in replication. i'll try to fix it anyway, i have full time just every weekend so maybe i'll post v1.1 in a couple of days or the next weekend, unless @Higor tell me what is wrong with it i know this guy can fix the replication just in 32 seconds.

    Code:
    class AntiAimCheat expands Mutator;
    
    var PlayerPawn P;
    var bool bWarned1, bWarned2;
    
    function PreBeginPlay()
    {
    	Log("AntiAimCheat mutator has initialized");
    }
    
    simulated function GetMyPlayer()
    {
    	local PlayerPawn PP;
    
    	foreach AllActors(Class'PlayerPawn',PP) {
    		if ( Viewport(PP.Player) != None ) {
    			P = PP;
    		}
    	}
    }
    
    simulated event PostBeginPlay ()
    {
    	GetMyPlayer();
    }
    
    simulated function Tick(float DeltaTime)
    {
    	if ( Level.NetMode == 3 || Level.NetMode == NM_Standalone ) {
    		if ( P == None ) {
    			GetMyPlayer();
    		}
    		else {
    			if ( P.bAlwaysMouseLook == False ) {
    				P.bAlwaysMouseLook = True;
    				MLActivity();
    			}
    			else if (P.bSnapLevel != 0) {
    				P.bSnapLevel = 0;
    				CVActivity();
    			}
    		}
    	}
    }
    
    function MLActivity()
    {	
    	if ( !bWarned1 ) {
    		P.ReceiveLocalizedMessage(Class'MouseLookMsg');
    		bWarned1 = True;
    	}
    	else {
    		P.ConsoleCommand("Say I was trying to disable Mouselook and I got caught :'<");
    		P.ConsoleCommand("Disconnect");
    	}
    }
    
    function CVActivity()
    {
    	if ( !bWarned2 ) {
    		P.ReceiveLocalizedMessage(Class'CenterViewMsg');
    		bWarned2 = True;
    	}
    	else {
    		P.ConsoleCommand("Say I was trying to use CenterView and I got caught :'<");
    		P.ConsoleCommand("Disconnect");
    	}
    }
    
    defaultproperties
    {
        bAlwaysRelevant=True
        bNetTemporary=True
        RemoteRole=2 // it is ROLE_SimulatedProxy, right ?
    }
    
    // ---
    
    class CenterViewMsg extends CriticalEventPlus;
    
    #exec OBJ LOAD FILE="Audio\Negative.uax" PACKAGE=AntiAimCheat
    
    var color msgColor;
    
    static function color GetColor( 
    	optional int Switch, 
    	optional PlayerReplicationInfo RelatedPRI_1, 
    	optional PlayerReplicationInfo RelatedPRI_2)
    	{
    		return Default.msgColor;
    	}
    
    static function string GetString( 
    	optional int Switch, 
    	optional PlayerReplicationInfo RelatedPRI_1, 
    	optional PlayerReplicationInfo RelatedPRI_2, 
    	optional Object OptionalObject)
    	{
    		return "[CENTERVIEW]";
    	}
    
    static simulated function ClientReceive( 
    	PlayerPawn P, 
    	optional int Switch, 
    	optional PlayerReplicationInfo RelatedPRI_1, 
    	optional PlayerReplicationInfo RelatedPRI_2, 
    	optional Object OptionalObject)
    	{
    		Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);
    		P.PlaySound(Sound'AntiAimCheat.Negative');
    	}
    
    defaultproperties
    {
        MsgColor=(R=255,G=0,B=0,A=0),
        FontSize=2
        bBeep=False
    }
    
    
    // ---
    
    class MouseLookMsg extends CriticalEventPlus;
    
    var color msgColor;
    
    static function color GetColor( 
    	optional int Switch, 
    	optional PlayerReplicationInfo RelatedPRI_1, 
    	optional PlayerReplicationInfo RelatedPRI_2)
    	{
    		return Default.msgColor;
    	}
    
    static function string GetString( 
    	optional int Switch, 
    	optional PlayerReplicationInfo RelatedPRI_1, 
    	optional PlayerReplicationInfo RelatedPRI_2, 
    	optional Object OptionalObject)
    	{
    		return "[MOUSELOOK]";
    	}
    
    static simulated function ClientReceive( 
    	PlayerPawn P, 
    	optional int Switch, 
    	optional PlayerReplicationInfo RelatedPRI_1, 
    	optional PlayerReplicationInfo RelatedPRI_2, 
    	optional Object OptionalObject)
    	{
    		Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);
    		P.PlaySound(Sound'AntiAimCheat.Negative');
    	}
    
    defaultproperties
    {
        MsgColor=(R=255,G=0,B=0,A=0),
        FontSize=2
        bBeep=False
    }
    the lack is for

    replication {
    reliable if (Role==ROLE_Authority)
    something; } ?
    w5ykj

  2. #62
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,676
    Country:
    There's a design issue here, gimme 30 mins and I'll get it right.
    ------------------------------------- * -------------------------------------

  3. #63
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,676
    Country:
    This is untested!
    I'd betatest it on a different place (pug server looks like a good place)

    AntiAimController.uc
    The controller detects players and adds an instance of the AntiAimCheat actor to each, which is then replicated.
    Uses advanced chained list handling, this is as fast as the code can get.
    Code:
    class AntiAimController expands Mutator;
    
    var int LastId;
    var AntiAimCheat handlerList;
    var bool bUnhooked;
    
    function PreBeginPlay()
    {
    	Log("AntiAimCheat mutator has initialized");
    	SetTimer(2, true);
    }
    
    function AddMutator(Mutator M)
    {
    	if ( M.IsA('nocv') || M.IsA('AntiAimController') )
    		M.Destroy(); //Don't need 2 versions of self... or anticv here
    	else
    		Super.AddMutator( M);
    }
    
    //Player detection
    event Timer()
    {
    	local pawn P;
    
    	if ( !bUnhooked )
    		Unhook();
    
    	if ( Level.Game.bGameEnded ) //Reduce load when game has ended
    	{
    		SetTimer(0, false);
    		While ( handlerList != none )
    			handlerList.Destroy(); //Destroy() calls the actor's Destroyed() event, which in turn, selects another handler as the main one
    		Destroy();
    		return;
    	}
    
    	if ( Level.Game.CurrentID > LastId )
    	{
    		For ( P=Level.PawnList ; P!=none ; P=P.nextPawn )
    		{
    			if ( P.PlayerReplicationInfo == none )				continue;
    			if ( P.PlayerReplicationInfo.PlayerID <= LastId )				break;
    			if ( (PlayerPawn(P) != none) && NetConnection(PlayerPawn(P).Player) != none ) //Only remote controlled clients
    				P.Spawn(class'AntiAimCheat', P).Setup(self, PlayerPawn(P) ); //Because if we kick the host... or the standalone player, we crash
    		}
    		LastId = Level.Game.CurrentId;
    	}
    
    }
    
    //We no longer require this mutator hooked on the GameInfo, all it does is add recursion to mutated functions we are not going to use anyways
    function Unhook()
    {
    	local Mutator M;
    	
    	if ( Level.Game.BaseMutator == self )
    		Level.Game.BaseMutator = NextMutator;
    	else
    	{
    		For ( M=Level.Game.BaseMutator ; M.NextMutator!=none ; M=M.NextMutator )
    			if ( M.NextMutator == self )
    			{
    				M.NextMutator = NextMutator;
    				break;
    			}
    	}
    	NextMutator = none;
    	bUnhooked = true;
    }
    
    
    defaultproperties
    {
        RemoteRole=ROLE_None
    }
    AntiAimCheat.uc
    The kicks are handled both client and serverside, for serverside kicks, we simply use Destroy().
    Added logging so that the ape admin can see them later.
    Time validation sounds redundant... until you realize a client can destroy any kind of actor in his machine, a destroyed actor will fail to validate and will kick the player (full server action), this validation system is also used on Siege's initial fingerprint check.
    Variable protection, the old method checked for the LocalPlayer's existance before enforcing the aim checks... thing is, that if we unset this var on every tick, we can render the anticheat COMPLETELY USELESS, I simply reformulated it so that unsetting Owner and LocalPlayer causes a clientside kick.
    This actor controls the master controller's chained list, just like pawns control the LevelInfo's pawnlist, without fail.
    Code:
    class AntiAimCheat expands Info;
    
    var PlayerPawn POwner, LocalPlayer;
    var bool bWarned1, bWarned2;
    var AntiAimCheat nextHandler;
    var AntiAimController Master;
    var float safetyTimer; //Has 2 different uses (client and server)
    
    replication
    {
    	reliable if ( Role < ROLE_Authority )
    		MLActivity, CVActivity, Validate;
    }
    
    function Setup( AntiAimController AAC, PlayerPawn P)
    {
    	POwner = P;
    	Instigator = P; //Just in case
    	safetyTimer = Level.TimeSeconds + 30 * Level.TimeDilation; //30 seconds to validate this actor
    
    	Master = AAC;
    	nextHandler = Master.handlerList;
    	Master.HandlerList = self;
    }
    
    //Called when this actor finished it's Destroy() call
    //Remove itself from the controller's chained list
    event Destroyed()
    {
    	local AntiAimCheat aH;
    	
    	if ( Master != none )
    	{
    		if ( Master.handlerList == self )
    			Master.handlerList = nextHandler;
    		else
    		{
    			For ( aH=Master.handlerList ; aH.nextHandler!=none ; aH=aH.nextHandler )
    				if ( aH.nextHandler == self )
    				{
    					aH.nextHandler = nextHandler;
    					break;
    				}
    		}
    	}
    }
    
    function Validate()
    {
    	safetyTimer = fMax( Level.TimeSeconds + 20 * Level.TimeDilation, Level.TimeSeconds);
    }
    
    simulated event PostNetBeginPlay()
    {
    	GetMyPlayer();
    	Validate();
    }
    
    simulated function GetMyPlayer()
    {
    	local PlayerPawn PP;
    
    	foreach AllActors(Class'PlayerPawn',PP) {
    		if ( Viewport(PP.Player) != None ) {
    			LocalPlayer = PP;
    		}
    	}
    }
    
    simulated function Tick(float DeltaTime)
    {
    	if ( Level.NetMode != NM_Client )
    	{
    		if ( POwner == none || POwner.bDeleteMe )
    			Destroy(); //Disconnected
    		else if ( Level.TimeSeconds >= safetyTimer )
    		{
    			Log("AntiAimCheat: Player kick > "$POwner.PlayerReplicationInfo.PlayerName$", reason: failure to validate");
    			POwner.Destroy();
    			Destroy();
    		}
    	}
    	else
    	{
    		if ( (safetyTimer -= DeltaTime / Level.TimeDilation) < 0 ) //Trigger periodic validations to make sure the client didn't destroy this actor
    		{
    			Validate();
    			safetyTimer = 3 + FRand();
    		}
    		
    		if ( LocalPlayer == none || (Owner == none && Level.TimeSeconds > 20) ) //Set on PostNetBeginPlay, kick if unset
    		{
    			GetMyPlayer();
    			LocalPlayer.Say("I tried to bypass the AntiAimCheat, now I'm out");
    			LocalPlayer.ConsoleCommand("Disconnect");
    		}
    		else if ( LocalPlayer.bAlwaysMouseLook )
    		{
    			LocalPlayer.bAlwaysMouseLook = True;
    			MLActivity();
    		}
    		else if ( LocalPlayer.bSnapLevel != 0)
    		{
    			LocalPlayer.bSnapLevel = 0;
    			CVActivity();
    		}
    	}
    }
    
    function MLActivity()
    {	
    	if ( !bWarned1 )
    	{
    		POwner.ReceiveLocalizedMessage(Class'MouseLookMsg');
    		bWarned1 = True;
    	}
    	else
    	{
    		Log("AntiAimCheat: Player kick > "$POwner.PlayerReplicationInfo.PlayerName$", reason: MouseLook disabled");
    		POwner.Say("I was trying to disable Mouselook and I got caught :'<");
    		POwner.Destroy();
    		Destroy();
    	}
    }
    
    function CVActivity()
    {
    	if ( !bWarned2 )
    	{
    		POwner.ReceiveLocalizedMessage(Class'CenterViewMsg');
    		bWarned2 = True;
    	}
    	else
    	{
    		Log("AntiAimCheat: Player kick > "$POwner.PlayerReplicationInfo.PlayerName$", reason: CenterView");
    		POwner.Say("I was trying to use CenterView and I got caught :'<");
    		POwner.Destroy();
    		Destroy();
    	}
    }
    
    defaultproperties
    {
        bAlwaysRelevant=False
        bNetTemporary=False
        bGameRelevant=True //Avoid calling IsRelevant for this actor in GameInfo
        RemoteRole=ROLE_SimulatedProxy // it is ROLE_SimulatedProxy, right ?
        NetPriority=2
        SafetyTimer=3
    }
    Last edited by Higor; 05-27-2013 at 12:42 AM.

  4. #64
    Rampage Crsk's Avatar
    Join Date
    Nov 2011
    Location
    I'm out
    Posts
    323
    Country:
    OMG I fucking love you, i'll compile it right now

    Edit
    Tested and Working: AntiAimCheatV1_1.rar

    Thanks Higor!
    Last edited by Crsk; 05-27-2013 at 02:15 AM.
    w5ykj

  5. #65
    Dominating utbusta's Avatar
    Join Date
    Jul 2011
    Location
    North Palm Beach, FL
    Posts
    413
    Country:
    I don't get the whole FOV?? Back in my good days we had a key set to FOV and rarely used it but it made the screen look all wierd but could see further to my sides and a bit to the rear. Are we talking about the same thing and why is it so bad?

  6. #66
    The Best There Ever Will Be! |uK|B|aZe//.'s Avatar
    Join Date
    Jan 2011
    Location
    London, United Kingdom
    Posts
    6,859
    its not bad, its actually quite useful if set right...

  7. #67
    Moderator .seVered.]['s Avatar
    Join Date
    Jun 2011
    Location
    Near a River and Under a Bridge
    Posts
    2,122
    Country:
    Quote Originally Posted by utbusta View Post
    I don't get the whole FOV?? Back in my good days we had a key set to FOV and rarely used it but it made the screen look all wierd but could see further to my sides and a bit to the rear. Are we talking about the same thing and why is it so bad?
    Well, it modifies how a weapon behaves 'normally' ... such that with the FOV assigned to a key I can 'zoom' using ANY weapon .. which of course is a MODIFIED behavior.. therefore it shouldn't be allowed... but it WAS fun when it WAS allowed... *wink

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Guardian aka Cyanide
    By HIGH+CAMILO in forum Bans
    Replies: 8
    Last Post: 01-23-2013, 07:20 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •