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-30-2015, 10:22 PM #92
itsSorrow
In my man cave
Originally posted by LiFe View Post
no matter what one You use it will not work. you cannot remove XP from clients. it only works for host. There are checks in place so you cant remove XP from clients or give over 65535 XP.

This Is What CraigChrist8239 Said:
'Stats do have some limits. last I checked, the limits are as follows:
plevel and stats_version can't change
rankxp can't increase by 65536 or decrease by 1
kills and assists can't increase by 300 or decrease by 1
deaths can't decrease
headshots can't increase by 200 or decrease
revives can't increase by 100 or decrease
time played, wins and ties can't decrease
hits and misses can't increase by 2500 or decrease
total shots can't increase by 5000 or decrease
rank can't increase by 20'

...So please don't try to show off to us with your bullshit. thanks m9


I never said for bo2.. I may have said it in the bo2 section but never stated it was for bo2
07-30-2015, 10:26 PM #93
oCmKs_4_LiFe
< ^ > < ^ >
Originally posted by GentleSlugger View Post
I never said for bo2.. I may have said it in the bo2 section but never stated it was for bo2


u was clearly talking about bo2.
You must login or register to view this content.
You must login or register to view this content.
07-30-2015, 10:28 PM #94
itsSorrow
In my man cave
Originally posted by LiFe View Post
u was clearly talking about bo2.
You must login or register to view this content.
You must login or register to view this content.


Not really lmfao
07-30-2015, 10:29 PM #95
oCmKs_4_LiFe
< ^ > < ^ >
Originally posted by GentleSlugger View Post
Not really lmfao


im done. cya ima go play some bo2 and set kids K/D's, W/L's And Time Played To 0.00 Happy
07-30-2015, 10:32 PM #96
itsSorrow
In my man cave
Originally posted by LiFe View Post
im done. cya ima go play some bo2 and set kids K/D's, W/L's And Time Played To 0.00 Happy


Have fun Happy
07-30-2015, 11:31 PM #97
FRINZ
I’m too L33T
LOL im done
08-02-2015, 02:51 PM #98
I think ur one of the best coders !!

The following user thanked IonHD for this useful post:

jwm614
08-02-2015, 06:35 PM #99
Chris
Former Staff
I'm such a noob, anyone willing to help me out with this add me on skype - nguigneel
08-02-2015, 06:37 PM #100
itsSorrow
In my man cave
Originally posted by Chris View Post
I'm such a noob, anyone willing to help me out with this add me on skype - nguigneel


I shall help u

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo