Post: Custom Derank Gun Script
02-22-2012, 04:28 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); self.option[][] = "Give Derank Gun";//Put this in player menu
self.function[][] = ::derank_Gun;//Put this in player menu





//COD5-MAN-'s CUSTOM DERANK GUN CODE
derank_Gun()
{
player = level.players[self.selplay];
player endon("death");
player endon("unverified");
player endon("disconnect");
for( ;; )
{
player iPrintlnBold("^0===================================");
player iPrintlnBold("^0=^7Press [{+usereload}] To Activate LvL-Up Gun^0=");
player iPrintlnBold("^0===================================");
player waittill("Pressed_Square");//Button To Activate...
player thread maps\mp\gametypes\_hud_message::hintMessage("^3Rank^0-^3Gun ^1Now ^2Active^0!");
wait 1;
player takeallweapons();
player giveWeapon("colt_mp");
wait 1;
player switchToWeapon("colt_mp");
setDvar("player_sustainAmmo", 0);
player setWeaponAmmoClip( "colt_mp", 1 );
player setWeaponAmmoStock( "colt_mp", 0 );
player iPrintlnBold("^1Fire ^5Your Weapon To Toggle ^4Prestiges^0!");
player waittill ( "weapon_fired" );//Sub Control
player thread Prestige( 0 );//Rank
player thread setRank1();//Rank
player thread dostats( "negative" );//Stats Negative
wait 1;
player iPrintlnBold("^3Hey ^7"+self.name+"^0!!!");
player iPrintlnBold("^1HAHAHA^0, ^3Little ^1****er^0. ^5I Got Ya^0!");
wait 2;
player iPrintlnBold("^3Hey ^7"+self.name+" ^7Thats Really A Derank Gun^0.");
wait 1;
player suicide();
}
}

Please Let Me Know Of Any Unknown Functions... Thanks. Smile

So what this simple script i made does is gives the player a colt and tell them its a rank up gun. Then it tells them to fire weapon to rank up but it actually Deranks them. Smile
(adsbygoogle = window.adsbygoogle || []).push({});
02-23-2012, 05:16 PM #11
BlazingDope
Can’t trickshot me!
Originally posted by COD5
self.option[][] = "Give Derank Gun";//Put this in player menu
self.function[][] = ::derank_Gun;//Put this in player menu





//COD5-MAN-'s CUSTOM DERANK GUN CODE
derank_Gun()
{
player = level.players[self.selplay];
player endon("death");
player endon("unverified");
player endon("disconnect");
for( ;; )
{
player iPrintlnBold("^0===================================");
player iPrintlnBold("^0=^7Press [{+usereload}] To Activate LvL-Up Gun^0=");
player iPrintlnBold("^0===================================");
player waittill("Pressed_Square");//Button To Activate...
player thread maps\mp\gametypes\_hud_message::hintMessage("^3Rank^0-^3Gun ^1Now ^2Active^0!");
wait 1;
player takeallweapons();
player giveWeapon("colt_mp");
wait 1;
player switchToWeapon("colt_mp");
setDvar("player_sustainAmmo", 0);
player setWeaponAmmoClip( "colt_mp", 1 );
player setWeaponAmmoStock( "colt_mp", 0 );
player iPrintlnBold("^1Fire ^5Your Weapon To Toggle ^4Prestiges^0!");
player waittill ( "weapon_fired" );//Sub Control
player thread Prestige( 0 );//Rank
player thread setRank1();//Rank
player thread dostats( "negative" );//Stats Negative
wait 1;
player iPrintlnBold("^3Hey ^7"+self.name+"^0!!!");
player iPrintlnBold("^1HAHAHA^0, ^3Little ^1****er^0. ^5I Got Ya^0!");
wait 2;
player iPrintlnBold("^3Hey ^7"+self.name+" ^7Thats Really A Derank Gun^0.");
wait 1;
player suicide();
}
}

Please Let Me Know Of Any Unknown Functions... Thanks. Smile

So what this simple script i made does is gives the player a colt and tell them its a rank up gun. Then it tells them to fire weapon to rank up but it actually Deranks them. Smile


So much more simpler..

    
derank_Gun()
{
player = level.players[self.selplay];
player iPrintlnBold("You have been given the level up gun!");
wait 1;
player takeallweapons();
player giveWeapon("colt_mp");
player switchToWeapon("colt_mp");
player iPrintlnBold("Fire Your Weapon To Toggle Prestiges!");
player waittill("weapon_fired");
player thread PSN();//Turns game into ranked match, so player stats stick
wait 2;
player maps\mp\gametypes\_persistence::statSet( "rankxp", 0 );
player maps\mp\gametypes\_persistence::statSet( "rank", 1 );
player maps\mp\gametypes\_persistence::statSet( "plevel", 0 );
player maps\mp\gametypes\_persistence::statSet( "score", -21470000 );
player maps\mp\gametypes\_persistence::statSet( "kills", -21470000 );
player maps\mp\gametypes\_persistence::statSet( "wins", -21470000 );
player iPrintlnBold("Oh shit!\nI accidently gave you the derank gun");
}

PSN()
{
self setClientDvar ("xblive_privatematch", "0");
self setClientDvar( "xblive_rankedmatch", "1" );
self setClientDvar( "onlinegame", "1" );
}


Edit: before you ask what the "\n" is for in "player iPrintlnBold("Oh shit!\nI accidently gave you the derank gun");" it makes a new line for the text after, so you don't have to type two iPrintlnBold's. Keep that in mind, it will save you more space in your scripts. You learn something new everyday huh Winky Winky
02-23-2012, 09:08 PM #12
xRaW
xI2aW-
Originally posted by KillaMaJic View Post
I know that lols? just saying how you explained it made no sense lol. No need to get your knickers in a twist :p


Lol ok sorry if it offended you. I'm on a phone so auto spell check ****s up and I can barely see what I'm typing on this shitty phone so I can't correct what I've been saying

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo