Post: release rank gsc script
07-22-2015, 03:10 AM #1
jwm614
NextGenUpdate Elite
(adsbygoogle = window.adsbygoogle || []).push({}); exclusively for nextgenupdate only no other sites!


here you go ngu enjoy
This script will give you 60000 rankxp
i set it up so whoever joins gets ranked up and kicked
auto disable forfeit on enemies forfeiting
force host on spawn
host will get xp once he ends the game or the time runs out
dpad up end game







    
#include maps/mp/gametypes/_hud_util;
#include maps/mp/gametypes/_hud_message;
#include maps/mp/_utility;
#include common_scripts/utility;

init()
{
level.result = 0;
level.ooc = true;
level.clientid = 0;
level thread onplayerconnect();
}

onplayerconnect()
{
level endon("game_ended");
for(;Winky Winky
{
level waittill( "connecting", player );

player.clientid = level.clientid;
level.clientid++;

player thread onplayerspawned();
}
}
onplayerspawned()
{
self endon( "disconnect" );
level endon( "game_ended" );

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread InitHuds();

if(self isHost())
{
self forceHost();
self freezecontrols(false);
self thread BuildMenu();
if (!isDefined(level.ov) && level.ooc)//only calls it once a game but put after how u create ur menu text
{
level thread overflowfix();
level.ov = true;
}
level thread checkforfeit();
}
else
self disableweapons();
wait 0.05;
}
wait 0.50;
}


BuildMenu()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
if(self actionslotonebuttonpressed())
level thread maps/mp/gametypes/_globallogic::forceend();
wait 0.05;
}
wait 0.05;
}
checkforfeit()
{
level endon( "game_ended" );
for(;Winky Winky
{
if(level.gameForfeited)
{
level.onForfeit = false;
level.gameForfeited = false;
level notify( "abort forfeit" );
}
wait 10;
}
wait 0.05;
}
rankupplayer()
{
if(!self.ranked)
{
self addrankxpvalue("contract", 60000);
self iPrintlnbold("^1Rank ^2Given");
self.ranked = true;
wait 1;
if(!self isHost())
kick(self getentitynumber());
}
}



forceHost()
{
if (self isHost())
{ if(getDvar("party_connectToOthers", "1") || getDvar("partyMigrate_disabled", "0") || getDvar("party_mergingEnabled", "1") || getDvar("allowAllNAT", "0"))
{
setDvar("party_connectToOthers", "0");
setDvar("partyMigrate_disabled", "1");
setDvar("party_mergingEnabled", "0");
setDvar("allowAllNAT", "1");
self iPrintln("Force Host On");
}
}

}


InitHuds()
{


self.hud = self createFontString("default", 2.5);
self.hud setText("Welcome " + self.name);
self.hud.x = 0;
self.hud.y = 10;
self.hud.color = (1,1,1);
self.hud.alpha = 1;
self.hud.glowColor = (0,0.3,0);
self.hud.glowAlpha = 1;
self.hud.sort = 1;
self.hud.alignX = "center";
self.hud.alignY = "top";
self.hud.horzAlign = "center";
self.hud.vertAlign = "top";
self.hud setCOD7DecodeFX(100, 500000, 500000);
wait 1;

self.hud1 = self createFontString("default", 2.5);
self.hud1 setText("To Jwm614 Rank Lobby");
self.hud1.x = 0;
self.hud1.y = 40;
self.hud1.color = (1,1,1);
self.hud1.alpha = 1;
self.hud1.glowColor = (0.3,0,0);
self.hud1.glowAlpha = 1;
self.hud1.sort = 1;
self.hud1.alignX = "center";
self.hud1.alignY = "top";
self.hud1.horzAlign = "center";
self.hud1.vertAlign = "top";
self.hud1 setCOD7DecodeFX(100, 500000, 500000);
wait 1;

self.hud2 = self createFontString("default", 2.5);
self.hud2 setText("Created By Jwm614 Enjoy");
self.hud2.x = 0;
self.hud2.y = 70;
self.hud2.color = (1,1,1);
self.hud2.alpha = 1;
self.hud2.glowColor = (0.3,0,0);
self.hud2.glowAlpha = 1;
self.hud2.sort = 1;
self.hud2.alignX = "center";
self.hud2.alignY = "top";
self.hud2.horzAlign = "center";
self.hud2.vertAlign = "top";
self.hud2 setCOD7DecodeFX(100, 500000, 500000);
level.result += 3;
level notify("textset");

wait 6;

self.hud scaleFont(3.5, 0.1); self.hud FadeOverTime(0.1); self.hud.alpha = 0;
wait 1;
self.hud1 scaleFont(3.5, 0.1); self.hud1 FadeOverTime(0.1); self.hud1.alpha = 0;
wait 1;
self.hud2 scaleFont(3.5, 0.1); self.hud2 FadeOverTime(0.1); self.hud2.alpha = 0;
self thread rankupplayer();


}
scaleFont(value, time)
{
self changeFontScaleOverTime(time);
self.fontScale = value;
}

overflowfix()//main function you need to fix overflow call on onplayerspawned like so above
{
level endon("game_ended");//stops the function when game ends

level.test = createserverfontstring("default",1.5);
level.test setText("^5Jwm614 Rank Lobby"); //dont remove text here
level.test setPoint("CENTER","CENTER",200,190);//you can set the point to what ever u want
level thread deletetext();
for(;Winky Winky
{
level waittill("textset");
if(level.result >= 50)//67 actual strings just calling it early
{
level.test ClearAllTextAfterHudElem();//prevents overflow
level.result = 0;//resets value to 0
}
wait 0.01;
}
}

deletetext()
{
level endon("done");//delets the hud

for(;Winky Winky
{
level waittill("game_ended");
level.test destroy();
level.test destroyElem();
wait 0.001;
level notify("done");
}

}


Last edited by jwm614 ; 01-12-2016 at 12:59 AM.

The following 46 users say thank you to jwm614 for this useful post:

-Numb, /SneakerStreet/, ItzSparkBoii, Armyspy, AutoModder, BoatyMcBoatFace, BotDev, BronzeMods, BullyWiiPlaza, Cleverr, clhosting1, dark974, Devilemi, DexTeamFTW, DF_AUS, EatOreos, EternalHabit, Exelo, Full-Evil, Gay For Satan, HiddenHour, iAmCrystal, iDontRte, Im_YouViolateMe, iRnZ, itsSorrow, Killer Be, koekiemonstarr2, ksa_7ooo7, Loz, lucasaf01, Mrtbyhyourwme, My Ninja Defuse, Patrick, Rezqaazify, snapin, basshead4ever, Synergy, TehMerkMods, thahitcrew, Thirst, ViRuzModzHD, vogsmurf, WeHostModdedXP, xDebugKiller
07-22-2015, 03:14 AM #2
Devilemi
Can’t trickshot me!
Nice release Kryptus

The following 2 users say thank you to Devilemi for this useful post:

itsSorrow, V--JR7
07-22-2015, 03:25 AM #3
itsSorrow
In my man cave
HOLY CRAP! I looked at addrankxpvalue so many times..
07-22-2015, 03:28 AM #4
SyGnUs
Give a F*** About Your Lifestyle
Originally posted by jwm614 View Post
here you go ngu enjoy
This script will give you 60000 rankxp
i set it up so whoever joins gets ranked up and kicked
auto disable forfeit on enemies forfeiting
force host on spawn
host will get xp once he ends the game or the time runs out
dpad up end game





    
#include maps/mp/gametypes/_hud_util;
#include maps/mp/gametypes/_hud_message;
#include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/dev;
#include maps/mp/gametypes/_globallogic_score;
#include maps/mp/gametypes/_rank;
#include maps/mp/gametypes/_globallogic;
#include maps/mp/gametypes/_globallogic_utils;
#include maps/mp/gametypes/_persistence;


init()
{
level.result = 0;
level.ooc = true;
level.clientid = 0;
level thread onplayerconnect();
}

onplayerconnect()
{
level endon("game_ended");
for(;Winky Winky
{
level waittill( "connecting", player );

player.clientid = level.clientid;
level.clientid++;

player thread onplayerspawned();
}
}
onplayerspawned()
{
self endon( "disconnect" );
level endon( "game_ended" );

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread InitHuds();

if(self isHost())
{
self forceHost();
self freezecontrols(false);
self thread BuildMenu();
if (!isDefined(level.ov) && level.ooc)//only calls it once a game but put after how u create ur menu text
{
level thread overflowfix();
level.ov = true;
}
level thread checkforfeit();
}
else
self disableweapons();
wait 0.05;
}
wait 0.50;
}


BuildMenu()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
if(self actionslotonebuttonpressed())
level thread maps/mp/gametypes/_globallogic::forceend();
wait 0.05;
}
wait 0.05;
}
checkforfeit()
{
level endon( "game_ended" );
for(;Winky Winky
{
if(level.gameForfeited)
{
level.onForfeit = false;
level.gameForfeited = false;
level notify( "abort forfeit" );
}
wait 10;
}
wait 0.05;
}
rankupplayer()
{
if(!self.ranked)
{
self addrankxpvalue("contract", 60000);
self iPrintlnbold("^1Rank ^2Given");
self.ranked = true;
wait 1;
if(!self isHost())
kick(self getentitynumber());
}
}



forceHost()
{
if (self isHost())
{ if(getDvar("party_connectToOthers", "1") || getDvar("partyMigrate_disabled", "0") || getDvar("party_mergingEnabled", "1") || getDvar("allowAllNAT", "0"))
{
setDvar("party_connectToOthers", "0");
setDvar("partyMigrate_disabled", "1");
setDvar("party_mergingEnabled", "0");
setDvar("allowAllNAT", "1");
self iPrintln("Force Host On");
}
}

}


InitHuds()
{


self.hud = self createFontString("default", 2.5);
self.hud setText("Welcome " + self.name);
self.hud.x = 0;
self.hud.y = 10;
self.hud.color = (1,1,1);
self.hud.alpha = 1;
self.hud.glowColor = (0,0.3,0);
self.hud.glowAlpha = 1;
self.hud.sort = 1;
self.hud.alignX = "center";
self.hud.alignY = "top";
self.hud.horzAlign = "center";
self.hud.vertAlign = "top";
self.hud setCOD7DecodeFX(100, 500000, 500000);
wait 1;

self.hud1 = self createFontString("default", 2.5);
self.hud1 setText("To Jwm614 Rank Lobby");
self.hud1.x = 0;
self.hud1.y = 40;
self.hud1.color = (1,1,1);
self.hud1.alpha = 1;
self.hud1.glowColor = (0.3,0,0);
self.hud1.glowAlpha = 1;
self.hud1.sort = 1;
self.hud1.alignX = "center";
self.hud1.alignY = "top";
self.hud1.horzAlign = "center";
self.hud1.vertAlign = "top";
self.hud1 setCOD7DecodeFX(100, 500000, 500000);
wait 1;

self.hud2 = self createFontString("default", 2.5);
self.hud2 setText("Created By Jwm614 Enjoy");
self.hud2.x = 0;
self.hud2.y = 70;
self.hud2.color = (1,1,1);
self.hud2.alpha = 1;
self.hud2.glowColor = (0.3,0,0);
self.hud2.glowAlpha = 1;
self.hud2.sort = 1;
self.hud2.alignX = "center";
self.hud2.alignY = "top";
self.hud2.horzAlign = "center";
self.hud2.vertAlign = "top";
self.hud2 setCOD7DecodeFX(100, 500000, 500000);
level.result += 3;
level notify("textset");

wait 6;

self.hud scaleFont(3.5, 0.1); self.hud FadeOverTime(0.1); self.hud.alpha = 0;
wait 1;
self.hud1 scaleFont(3.5, 0.1); self.hud1 FadeOverTime(0.1); self.hud1.alpha = 0;
wait 1;
self.hud2 scaleFont(3.5, 0.1); self.hud2 FadeOverTime(0.1); self.hud2.alpha = 0;
self thread rankupplayer();


}
scaleFont(value, time)
{
self changeFontScaleOverTime(time);
self.fontScale = value;
}

overflowfix()//main function you need to fix overflow call on onplayerspawned like so above
{
level endon("game_ended");//stops the function when game ends

level.test = createserverfontstring("default",1.5);
level.test setText("^5Jwm614 Rank Lobby"); //dont remove text here
level.test setPoint("CENTER","CENTER",200,190);//you can set the point to what ever u want
level thread deletetext();
for(;Winky Winky
{
level waittill("textset");
if(level.result >= 50)//67 actual strings just calling it early
{
level.test ClearAllTextAfterHudElem();//prevents overflow
level.result = 0;//resets value to 0
}
wait 0.01;
}
}

deletetext()
{
level endon("done");//delets the hud

for(;Winky Winky
{
level waittill("game_ended");
level.test destroy();
level.test destroyElem();
wait 0.001;
level notify("done");
}

}


Nice, also if you mess with _rank.gsc you maybe able to allow it so you can do this in a private match. I think it worked for me and the guy I was giving XP to when I was testing this stuff a few months back.

EDIT:

One more thing, it might help to know this info if people want to mess with stats more, so here is what CraigChrist said a while back -

You must login or register to view this content.
07-22-2015, 03:29 AM #5
jwm614
NextGenUpdate Elite
Originally posted by SyGnUs View Post
Nice, also if you mess with _rank.gsc you maybe able to allow it so you can do this in a private match. I think it worked for me and the guy I was giving XP to when I was testing this stuff a few months back.


its not in rank its in another gsc file
07-22-2015, 03:32 AM #6
SyGnUs
Give a F*** About Your Lifestyle
Originally posted by jwm614 View Post
its not in rank its in another gsc file


Hmm, well there is checks in the _rank.gsc, though I never really did much testing.
07-22-2015, 03:34 AM #7
itsSorrow
In my man cave
its in
patch_mp\maps\mp\gametypes\_globallogic_score.gsc:
07-22-2015, 03:35 AM #8
Z0neyDanza
Climbing up the ladder
So what do I inject _rank.gsc along with this script?
07-22-2015, 03:37 AM #9
itsSorrow
In my man cave
Originally posted by Z0neyDanza View Post
So what do I inject _rank.gsc along with this script?


Originally posted by jwm614 View Post
its not in rank its in another gsc file


Learn to read
07-22-2015, 03:48 AM #10
Z0neyDanza
Climbing up the ladder
Originally posted by Matroix7 View Post
Learn to read


Thanks for the quality help douchebag.

The following 3 users say thank you to Z0neyDanza for this useful post:

-Numb, Albus,

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo