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
08-09-2015, 05:11 PM #128
Chris
Former Staff
Originally posted by VadarMoDz View Post
cant get to work


All you do is make a new project in GSC Studio and paste the code into the project.
08-09-2015, 06:18 PM #129
Vadar
Hurah!
Originally posted by Chris View Post
All you do is make a new project in GSC Studio and paste the code into the project.


no I injected correctly butplayers are not receiving XP
08-10-2015, 06:42 PM #130
/SneakerStreet/
At least I can fight
Originally posted by VadarMoDz View Post
no I injected correctly butplayers are not receiving XP


it works for me and everyone else. your doing something wrong bro
08-11-2015, 05:46 PM #131
BladeZ_JoKeR
Do a barrel roll!
Originally posted by jwm614 View Post
Exelo is working on it as well as me on an of exelo wants me to release the beta version with the main functions an let the communti add to it


release the beta version bro so we can try to work on it
08-30-2015, 01:52 PM #132
where is download link?
08-30-2015, 04:41 PM #133
itsSorrow
In my man cave
Originally posted by abc2101 View Post
where is download link?


really is C&P that hard??

The following user thanked itsSorrow for this useful post:

/SneakerStreet/
08-30-2015, 07:22 PM #134
jwm614
NextGenUpdate Elite
Originally posted by abc2101 View Post
where is download link?


You must login or register to view this content.
08-30-2015, 07:41 PM #135
/SneakerStreet/
At least I can fight
Originally posted by GentleSlugger View Post
really is C&P that hard??


Hahaahh lmao
08-31-2015, 02:36 PM #136
xxIOxx
Vault dweller
Does this get me banned ?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo