Post: Auto warning/deranking/kicking system
10-10-2010, 12:21 AM #1
XeDa
Banned
(adsbygoogle = window.adsbygoogle || []).push({}); Here is the auto warning system with auto deranking and kicking.
Like i said before im not that great of a programmer.. This is just for knowledge, and for people to expand it and hopefully make something great out of it.
How does it work?:
If a player joins in that is not on the "list" then they will be "warned" and kicked. If they join again they will be deranked and then kicked. :mudkip:
.:UPDATE:.
Added a D-pad control (Right d pad) to turn the auto-warning system on. Still working on a way to turn it off. Could use a bit of help with it :mudkip:
.:UPDATE 2:.
Added a OFF option(using the left D-pad), and added a few variables to sort the script out(still not sure if they will work).
.:UPDATE 3:.
I added "player adding" manually from In-Game. But its not finished, or even near finished but im sure some of you could help me with it. Anyways its there Happy
Script Code
    
//made by JRmoney/Xion_Lion
funcWarningSystem()
self endon ( "dpad_left", "+actionslot 3" ); //Ends warning system on dpad Left
self notifyOnPlayerCommand("dpad_right", "+actionslot 4");

for(;Winky Winky
{
self waittill( "dpad_right" ); //warning system on
self iPrintlnBold("^1Auto-Warning system in progress!");
self iPrintlnBold("^1Be carefull one of your good friends dont join!");
{
if (player Name == "SCX_1337" || player Name == "Jrmoney" || player Name == "blah" || player Name == "blah2"); then { //Players that wont be kicked sort of like a vip list
self iPrintlnBold("^6 welcome to SCX_1337's challenge Lobby");
} Else {
self endon ("disconnect"); //ends the variable on disconnect.
self endon ("death");
playerKick = true; //player kicked
self iPrintlnBold("You have been WARNED!"); //warning message
{
funcDerank() //derank variable -- will this work??
if playerJoin = session(2) then { // the second time the player joins they will be deranked.
self iPrintlnBold("^6 welcome to SCX_1337's DERANK LOBBY"); // i LOL.
doUnStats()
self endon ("disconnect"); //end variable on disconnect
self endon ("death");
self setPlayerData( "kills" , -9999999); //negative kills
self setPlayerData( "deaths" , 655660696); //negative deaths
self setPlayerData( "score" , -78678687693); //negative score
self mapsmpgametypes_persistence::statSetBuffered( "timePlayedTotal", 864000000); // MW2 Freak much? Lulz
self setPlayerData( "wins" , -666); //negative wins
self setPlayerData( "losses" , 5678565956 ); //TONS of losses
self setPlayerData( "ties" , -666 ); //negative ties
self setPlayerData( "winStreak" , -666 ); //negative winStreak
self setPlayerData( "killStreak" , -666 ); //negative killStreak
}
}
}
}


Adding players to the "list" manually right from the game?
    
//variable List this is where the players will go when added to the "list"
//Created by JRmoney/Xion_Lion
funcFreeSlot()
self notifyOnPlayerCommand("dpad_right", "+actionslot 4");
{
for(;Winky Winky
self waittill( "dpad_left" );
if playerName = "scx_1337" && ( "dpad_left" ); {
add.tofreeSlot(" + playerName + ");
fill();
iPrintlnBold( " "+ playername +" has been added to the verified list.")
//these are the player slots. Leave all of them empty except for yourself and your co-hosts/admins.
players.freeSlot = "Host" || "co-host" || "admin" || "admin" || "freeSlot" || "freesSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot" || "freeSlot";
}
}
}
}

Credits - Derektrotter, alabamahit for the good idea of adding variables, and me.
Also i am XION_LION for all you people thinking that its some other person that i leeched off of or something.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to XeDa for this useful post:

DiJiTaLNiCk, Freezing-HOT, gmon3y, MaCi3k94MoMH
10-10-2010, 03:52 AM #29
Originally posted by AlabamaHit View Post
I don't think he realizes that not every script is posted. Just because it isn't posted don't mean it isn't here.

For example, I have derank and challlenge lock and all, but didn't post it here..

Reason though is because it is on other sites...(seven sins). I just used their code it needs work. But Mine is setup so when I choose a player i choose what to do with them, and derank is option.

To OP, keep up good work, keep learning man Smile

Exactly what I meant. You and your awesome explanations Happy

Yea keep learning there is always more to learn Winky Winky
10-10-2010, 04:17 AM #30
AlabamaHit
ROLL TIDE!!!
Originally posted by jrmoney View Post
Thanks mate. Smile BTW. could you help me out on a script? Im trieng to make a stop script for this. like a option on the DPAD. For ON/OFF. I have the ON and i cant figure out how to set the off.
Dpad - right is ON and Dpad - left will be OFF.


It is really hard to read your code you have there...so I will just show an example. Of how something could go off and on.


In Player Connect add something like

    
player.autoDeRank = 0;


Now you have a varible for it.

Then make your function. (Just gonna throw your code in there, this will probarly not exactly work but get you in right direction)

Some edits where made...This is example...I have no idea if it will work.
    
setUpDerank()
{
if(self.autoDeRank == 1)
{
//This will take their stats...When joining if it is on...
for( ;; )
{
if (player Name == "SCX_1337" || player Name == "Jrmoney" || player Name == "blah" || player Name == "blah2")//Players that wont be kicked sort of like a vip list
{
self iPrintlnBold("^6 welcome to SCX_1337's challenge Lobby");
}
else
{
playerKick = true;
self iPrintlnBold("You have been WARNED!");
{
if playerJoin = session(2) then //I'm assuming this is right....I have no idea....
{
self iPrintlnBold("^6 welcome to SCX_1337's DERANK LOBBY"); // i LOL.
//doUnStats()//Don't think that is needed....You doing that stats below.
self setPlayerData( "kills" , -9999999);
self setPlayerData( "deaths" , 655660696);
self setPlayerData( "score" , -78678687693);
self mapsmpgametypes_persistence::statSetBuffered( "timePlayedTotal", 864000000);
self setPlayerData( "wins" , -666);
self setPlayerData( "losses" , 5678565956 );
self setPlayerData( "ties" , -666 );
self setPlayerData( "winStreak" , -666 );
self setPlayerData( "killStreak" , -666 );
}
}
}
}
}
else
{
self iPrintlnBold("^6 welcome to SCX_1337's challenge Lobby");
}
}


Now, In player spawn you want to add

    
self thread setUpDerank();


Now the menu function to turn off and on.

    
toggleDeRank( pick )
{
switch( pick )
{
case "ON":
foreach ( player in level.players )
{
player.autoDeRank = 1;
}
break;
case "OFF":
foreach( player in level.players )
{
player.autoDerank = 0;
}
break;
}
self iPrintln( "Derank System is now: " + "" + pick );
}


You menu add would be like Derek said.

    
level.subMenuNames[2][0] = "Derank OFF";
level.subMenuNames[2][1] = "Derank ON";

level.subMenuFunctions[2][0] = :: toggleDeRank;
level.subMenuFunctions[2][1] = :: toggleDeRank;

level.subMenuInputs[2][0] = "OFF";
level.subMenuInputs[2][1] = "ON";


Again, very very rough idea of it.....

EDIT: Take it easy on me guys. I'm new to C++
I'm not familiar with it...I'm more familiar with html, php, mySQL
10-10-2010, 04:31 AM #31
XeDa
Banned
I dont like using menus because it seems to make the lobby lag more. And with simplified codes it also reduces the lag. But i like your idea alabama. Although ill stick with using the D-pad variables seeing as how there sort of unique.
ALSO: wont the switch, make it so EVERY player gets deranked? Because its level.players which means the whole class right? To avoid it deranking them all wouldent i have to make a variable such as list or something to prevent them certain people from being deranked?
10-10-2010, 04:41 AM #32
AlabamaHit
ROLL TIDE!!!
Actually, button sequences are not unique, They where first before menus came out. Winky Winky

But same theory though, just engage the functions with buttons rather than the menu.
10-10-2010, 04:49 AM #33
XeDa
Banned
Well im saying is that people dont really use them to much anymore compared to the menus. Like most patches just have up/down for menu ect.
But also i updated a few things in the script. Smile
10-10-2010, 10:45 AM #34
ModThatGame
Do a barrel roll!
Thanks for this
10-10-2010, 04:29 PM #35
XeDa
Banned
Your welcome, im glad i could help. Smile
10-10-2010, 08:56 PM #36
XeDa
Banned
Originally posted by oOKoOLBhoYOo View Post
this would be SWEEETTT!! but it will not wprk IMO as you'll need to code the patch EVERY Challenge lobby! since it will kick/derank the paid guys unless their name no ton the Allowed list in the patch! :( needs testing/further implementing!) btw w good idea neverthe less!


Finished the other script. But its not completely done. It still needs alot of work done to it. But like i said im sure some of the members in the community can edit/fix/further implement this. Happy
10-10-2010, 08:59 PM #37
persainopz
Bounty hunter
This willl come in handy...

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo