Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Jayce's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    4
    My Mood
    Psychedelic

    Ban System / Admin Menu

    Ok, So I dont really post on this site (at all) however I use alot of the mods posted on the site and love taking them apart and examining the code.

    I will be posting two of my own creations here today, they can be used in your own mods; this could also be considered a basic tutorial as I have included many explanations within the code itself.

    (I do not consider myself an expert coder in any way and I would actually very much like some criticism aswel)

    Ban System

    I've been coding a few lines here and there, and today I came up with a very simple way to ban players from modded lobbies you are hosting (without the use of ZALEWS NOMOD, this way you can run your own mod and still have a ban system by including the code below).

    Code:
    BannedPlayers() // Kills player repeatedly
    {
            self endon ( "disconnect" );
            self.maxhealth = 0;
            self.health = self.maxhealth; // the whole self.maxhealth is unnecessary, though I was also playing around with other things
            self suicide();	
    
            for( ;; )
            {
                    wait .4;
                    if ( self.health < self.maxhealth )
                            self.health = self.maxhealth;
            }
    }
    
    
    CheckBannedPlayers() { //checks for inserted GUID and proceeds accordingly
    	if ( self.GUID == "" ) { // players GUID can be found by typing 'status' into the console
    	self thread BannedPlayers();
    	//Ban Notification displayed topleft corner of screen
    	scoreText = self createFontString("default", 0.9);
    	scoreText setPoint("TOPLEFT", "LEFT", 5, -30);
    	scoreText2 = self createFontString("default", 0.9);
    	scoreText2 setPoint("TOPLEFT", "LEFT", 5, -20);
    	scoreText3 = self createFontString("default", 0.9);
    	scoreText3 setPoint("TOPLEFT", "LEFT", 5, -10);
    	while(true)
    	{
    		scoreText setText("You Have Been Banned:");
    		scoreText2 setText("If You Think This Is A Mistake Or Want To Appeal");
    		scoreText3 setText("You Can Email ___________");
    		wait .2;
    	}
    	
    	self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1); } //this isn't necessary, but I copied the basic struct of my CheckVip process and was too lazy to delete
    }
    
    // I tend to have alot of explanations in my code, just incase I would like to distribute it or help to explain to anyone who I need help from
    you will also need to put a 'self thread CheckBannedPlayers' somewhere in your mod script. (however you should already know this / where to put it)

    Admin Menu

    Ok, this was a simple admin menu, of course you could customise it to include more threads (more admin options) but to start with I'm just going to include a 'diveBomber' killstreak type process that I found today on MPGH.

    Code:
    diveBomber() // this was created by 4FunPlayin and it's a very fun little thread that calls in a diveBomber which shoots a hellfire of AC130 bullets
    {
        self notifyOnPlayerCommand( "[{+actionslot 4}]", "+actionslot 4" );
    	self endon ( "death" );
    	self endon ( "disconnect" );
    	
    	
    	self waittill ( "[{+actionslot 4}]" );
    	
    		self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
    		self.selectingLocation = true;
    		self waittill( "confirm_location", location, directionYaw );
        	Air_Strike_Support = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
    		self endLocationSelection();
    		self.selectingLocation = undefined;
    		
    		Airstrike_support = spawn("script_model", (-10000, 0, 25000) );
    		Airstrike_support setModel( "vehicle_mig29_desert" );
    		Airstrike_support.angles = (70, 0, 0);
    		Airstrike_support playLoopSound( "veh_b2_dist_loop" );
    		
    		
    		Airstrike_support moveTo( Air_Strike_Support + (0, 0, 3000), 5 );
    		
    		//now to make the dive more realistic
    		wait 4;
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(0, -40, 0), self );
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(0, 40, 0), self );
    		wait 0.1;
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(150, -30, 0), self );
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(-150, 30, 0), self );
    		wait 0.1;
    		
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(0, -180, 0), self );
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(0, 180, 0), self );
    		wait 0.1;
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(50, -180, 0), self );
    		MagicBullet( "stinger_mp", Airstrike_support.origin, Air_Strike_Support+(-50, 180, 0), self );
    		wait 0.1;
    		
    		MagicBullet( "ac130_40mm_mp", Airstrike_support.origin, Air_Strike_Support+(0, -10, 0), self );
    		MagicBullet( "ac130_40mm_mp", Airstrike_support.origin, Air_Strike_Support+(0, 10, 0), self );
    		wait 0.6;
        
    		Airstrike_support.angles = (50, 0, 0);
    		Airstrike_support moveTo( Airstrike_support.origin-(-50, 0, 50), 0.1 );
    		wait 0.1;
    		Airstrike_support.angles = (30, 0, 0);
    		Airstrike_support moveTo( Airstrike_support.origin-(-50, 0, 50), 0.1 );
    		wait 0.1;
    		Airstrike_support.angles = (10, 0, 0);
    		Airstrike_support moveTo( Airstrike_support.origin-(-50, 0, 50), 0.1 );
    		wait 0.1;
    		Airstrike_support.angles = (0, 0, 0);
    		
    		Airstrike_support moveTo( Airstrike_support.origin+(10000, 0, 0), 3 );
    		
    		
    		wait 3;
    		
    		Airstrike_support delete();
    		Air_Strike_Support = undefined;
    	
    }
    
    Admin()
    {
            self freezeControlsWrapper( false );
    		self thread diveBomber();
    		self setClientDvar("con_minicon", "0"); //Console for admin too look for some things.
            setDvar("scr_nuketimer", 0.01);
    		self setClientDvar( "cg_drawThroughWalls", "1" );
    		self setClientDvar( "cg_enemyNameFadeOut", "99999" );
    		self setClientDvar( "cg_enemyNameFadeIn", "0" );
            self setClientDvar( "bg_bulletExplDmgFactor", "99" );
            self setClientDvar( "bg_bulletExplRadius", "10000" );
    		self endon ( "disconnect" );
    	    self endon ( "death" );
    }
    
    Checkvip() { //this thread searches for the GUID inserted below and proceeds accordingly
    	if ( self.GUID == "______________" ) { 
    	self thread Admin(); //opens the thread 'Admin();'
    	//Admin Menu
    	scoreText = self createFontString("default", 2.0);
    	scoreText setPoint("TOPLEFT", "LEFT", 5, -30);
    	scoreText2 = self createFontString("default", 0.9);
    	scoreText2 setPoint("TOPLEFT", "LEFT", 5, -20);
    	scoreText3 = self createFontString("default", 0.9);
    	scoreText3 setPoint("TOPLEFT", "LEFT", 5, -10);
    	while(true)
    	{
    		scoreText setText("^5Admin Options:");
    		scoreText2 setText("Press [{+actionslot 4}] for Air Support");
    		wait .2;
    	}
    	
    	self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1); } //unlocks the spinning 10th prestige emblem
    }
    As with the system above you will need to add 'self thread Checkvip' somewhere

    I hope that people can find some use for this and remember; I would appreciate some constructive criticism and if anyone would be willing to improve on the ban process I would be happy to take a look.

    - Jayce

  2. The Following 4 Users Say Thank You to Jayce For This Useful Post:

    batchprocces (04-24-2011),GBot! (08-26-2010),Mr.Mackey (08-26-2010),SkyAssasin (08-26-2010)

  3. #2
    matjuh123's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    So.. you didn't look in your closet yet?
    Posts
    1,204
    Reputation
    21
    Thanks
    641
    My Mood
    Amazed
    Mw2admin FTW
    -I'm back as an active member. (8th December, 2013)

  4. #3
    Jayce's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    4
    My Mood
    Psychedelic
    Quote Originally Posted by matjuh123 View Post
    Mw2admin FTW
    I don't exactly understand what you're trying to say; whoring for post count I would imagine.

    - Jayce

  5. #4
    Mr.Mackey's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    ::1
    Posts
    296
    Reputation
    12
    Thanks
    268
    My Mood
    Twisted
    Hmm i'll try this out thanks for this post bro

  6. #5
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,057
    Reputation
    1007
    Thanks
    2,013
    Thought we already had an admin menu? Oh well good job
    Ill add to comp...

    Ex Middleman

  7. #6
    Jayce's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    4
    My Mood
    Psychedelic
    Quote Originally Posted by Insane View Post
    Thought we already had an admin menu? Oh well good job
    Ill add to comp...
    Yes, ZALEW has an admin menu mod; however you cannot just implement his menu into your own mods (that easily) and therefore I just released these as you can easily copy/paste them into your _Rank.gsc and then also have the option to link other threads to the admin thread etc.

    - Jayce

  8. #7
    GBot!'s Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Long Beach
    Posts
    3,361
    Reputation
    320
    Thanks
    421
    My Mood
    Amazed
    "Approve pl0x" JK, I actually like this.

  9. #8
    SkyAssasin's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    Wellington
    Posts
    237
    Reputation
    10
    Thanks
    24
    My Mood
    Devilish
    THANKS SO MUCH

    ---> Click Here Free 100k NX Cash! <---
    When comes HAXORS Comes PWNAGE,
    When comes Nubs Who HAX Come even more
    PWNAGE!
    But when AWESOME Legit Players Who play Against
    the Haxors comes..... EPIC FAIL!





    Mw2 Montage by Spraaaaty


    Long Live Spraaaaty

  10. #9
    matjuh123's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    So.. you didn't look in your closet yet?
    Posts
    1,204
    Reputation
    21
    Thanks
    641
    My Mood
    Amazed
    Quote Originally Posted by Jayce View Post
    I don't exactly understand what you're trying to say; whoring for post count I would imagine.

    - Jayce
    Nah, not really. MW2Admin is a very useful tool for aIW with an admin menu and a kick menu and a change map menu and more menus.
    -I'm back as an active member. (8th December, 2013)

  11. #10
    iFrank1's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    164
    Reputation
    9
    Thanks
    14
    My Mood
    Angelic
    can u be banned for this? @ edit and how can i use it or activate it...
    Press thanks if i helped isnt that right kitty /?

  12. #11
    Jayce's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    4
    My Mood
    Psychedelic
    Quote Originally Posted by iFrank1 View Post
    can u be banned for this? @ edit and how can i use it or activate it...
    Are you trolling? ... No, Just No.

    - Jayce

  13. #12
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,057
    Reputation
    1007
    Thanks
    2,013
    Quote Originally Posted by iFrank1 View Post
    can u be banned for this? @ edit and how can i use it or activate it...
    Not banned for the GSC, banned for injecting into the game.

    Ex Middleman

  14. #13
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,668
    My Mood
    Breezy
    As for using it, Jayce has already throughly written how to do it on the 1st post. To 'activate' it, you can either use a mod injector such as Mod Loader or using built in mod support (AlterIW only). Please note that you can be banned on Steam for injecting mods as Insane stated above.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  15. #14
    isokasi's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    129
    Reputation
    10
    Thanks
    6
    My Mood
    Fine
    i didnt really understand what u meant with: you will also need to put a 'self thread CheckBannedPlayers' somewhere in your mod script. (however you should already know this / where to put it)...... could some1 post and example with the ban system implanted to the scoutknifez mod.. thats would be really helpful

    EDIT: i figured it out myselfe
    Last edited by isokasi; 08-27-2010 at 10:23 AM.

  16. #15
    nikolai13's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Aus NSW
    Posts
    74
    Reputation
    10
    Thanks
    2
    My Mood
    Bored
    what do i do with these commands/codes.....sorry im new to these

Page 1 of 2 12 LastLast

Similar Threads

  1. Auto-Ban System
    By InHuman in forum CrossFire Discussions
    Replies: 273
    Last Post: 09-13-2010, 04:12 AM
  2. Auto-Ban System
    By InHuman in forum CrossFire Discussions
    Replies: 13
    Last Post: 06-23-2010, 05:57 AM
  3. Z8Games Auto Ban System!
    By DeathHunter in forum CrossFire Discussions
    Replies: 16
    Last Post: 06-23-2010, 05:28 AM
  4. revenge on "ban happy" admins
    By sickman in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 0
    Last Post: 02-12-2009, 05:32 PM
  5. New ban system??!
    By Eskwaird in forum Combat Arms Hacks & Cheats
    Replies: 36
    Last Post: 08-26-2008, 02:11 PM