You are viewing our Forum Archives. To view or take place in current topics click here.
WHAT KIND OF CODE IS THIS IN? [+REP]
Posted:

WHAT KIND OF CODE IS THIS IN? [+REP]Posted:

Glxy
  • Rising Star
Status: Offline
Joined: Nov 19, 201310Year Member
Posts: 705
Reputation Power: 29
Status: Offline
Joined: Nov 19, 201310Year Member
Posts: 705
Reputation Power: 29
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include common_scripts\utility;

init()
{
precacheString( &"MP_FIRSTPLACE_NAME" );
precacheString( &"MP_SECONDPLACE_NAME" );
precacheString( &"MP_THIRDPLACE_NAME" );
precacheString( &"MP_MATCH_BONUS_IS" );

precacheMenu( "splash" );
precacheMenu( "challenge" );
precacheMenu( "defcon" );
precacheMenu( "killstreak" );
precacheMenu( "perk_display" );
precacheMenu( "perk_hide" );
precacheMenu( "killedby_card_display" );
precacheMenu( "killedby_card_hide" );
precacheMenu( "youkilled_card_display" );

game["menu_endgameupdate"] = "endgameupdate";
if ( level.splitscreen )
game["menu_endgameupdate"] += "_splitscreen";
precacheMenu(game["menu_endgameupdate"]);

game["strings"]["draw"] = &"MP_DRAW";
game["strings"]["round_draw"] = &"MP_ROUND_DRAW";
game["strings"]["round_win"] = &"MP_ROUND_WIN";
game["strings"]["round_loss"] = &"MP_ROUND_LOSS";
game["strings"]["victory"] = &"MP_VICTORY";
game["strings"]["defeat"] = &"MP_DEFEAT";
game["strings"]["halftime"] = &"MP_HALFTIME";
game["strings"]["overtime"] = &"MP_OVERTIME";
game["strings"]["roundend"] = &"MP_ROUNDEND";
game["strings"]["intermission"] = &"MP_INTERMISSION";
game["strings"]["side_switch"] = &"MP_SWITCHING_SIDES";
game["strings"]["match_bonus"] = &"MP_MATCH_BONUS_IS";

level thread onPlayerConnect();
}


onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

player thread hintMessageDeathThink();
player thread lowerMessageThink();

player thread initNotifyMessage();
}
}

hintMessage( hintText )
{
notifyData = spawnstruct();

notifyData.notifyText = hintText;
notifyData.glowColor = (0.3, 0.6, 0.3);

notifyMessage( notifyData );
}


initNotifyMessage()
{
if ( level.splitscreen )
{
titleSize = 2.0;
textSize = 1.5;
iconSize = 24;
font = "default";
point = "TOP";
relativePoint = "BOTTOM";
yOffset = 30;
xOffset = 0;
}
else
{
titleSize = 2.5;
textSize = 1.75;
iconSize = 30;
font = "objective";
point = "TOP";
relativePoint = "BOTTOM";
yOffset = 50;
xOffset = 0;
}

self.notifyTitle = createFontString( font, titleSize );
self.notifyTitle setPoint( point, undefined, xOffset, yOffset );
self.notifyTitle.glowColor = (0.2, 0.3, 0.7);
self.notifyTitle.glowAlpha = 1;
self.notifyTitle.hideWhenInMenu = true;
self.notifyTitle.archived = false;
self.notifyTitle.alpha = 0;

self.notifyText = createFontString( font, textSize );
self.notifyText setParent( self.notifyTitle );
self.notifyText setPoint( point, relativePoint, 0, 0 );
self.notifyText.glowColor = (0.2, 0.3, 0.7);
self.notifyText.glowAlpha = 1;
self.notifyText.hideWhenInMenu = true;
self.notifyText.archived = false;
self.notifyText.alpha = 0;

self.notifyText2 = createFontString( font, textSize );
self.notifyText2 setParent( self.notifyTitle );
self.notifyText2 setPoint( point, relativePoint, 0, 0 );
self.notifyText2.glowColor = (0.2, 0.3, 0.7);
self.notifyText2.glowAlpha = 1;
self.notifyText2.hideWhenInMenu = true;
self.notifyText2.archived = false;
self.notifyText2.alpha = 0;

self.notifyIcon = createIcon( "white", iconSize, iconSize );
self.notifyIcon setParent( self.notifyText2 );
self.notifyIcon setPoint( point, relativePoint, 0, 0 );
self.notifyIcon.hideWhenInMenu = true;
self.notifyIcon.archived = false;
self.notifyIcon.alpha = 0;

self.notifyOverlay = createIcon( "white", iconSize, iconSize );
self.notifyOverlay setParent( self.notifyIcon );
self.notifyOverlay setPoint( "CENTER", "CENTER", 0, 0 );
self.notifyOverlay.hideWhenInMenu = true;
self.notifyOverlay.archived = false;
self.notifyOverlay.alpha = 0;

self.doingSplash = [];
self.doingSplash[0] = undefined;
self.doingSplash[1] = undefined;
self.doingSplash[2] = undefined;
self.doingSplash[3] = undefined;

self.splashQueue = [];
self.splashQueue[0] = [];
self.splashQueue[1] = [];
self.splashQueue[2] = [];
self.splashQueue[3] = [];
}


oldNotifyMessage( titleText, notifyText, iconName, glowColor, sound, duration )
{
notifyData = spawnstruct();

notifyData.titleText = titleText;
notifyData.notifyText = notifyText;
notifyData.iconName = iconName;
notifyData.glowColor = glowColor;
notifyData.sound = sound;
notifyData.duration = duration;

notifyMessage( notifyData );
}


notifyMessage( notifyData )
{
self endon ( "death" );
self endon ( "disconnect" );

if ( !isDefined( notifyData.slot ) )
notifyData.slot = 0;

slot = notifyData.slot;

if ( !isDefined( notifyData.type ) )
notifyData.type = "";

if ( !isDefined( self.doingSplash[ slot ] ) )
{
self thread showNotifyMessage( notifyData );
return;
}/*
#2. Posted:
Obtain
  • TTG Senior
Status: Offline
Joined: Aug 12, 201013Year Member
Posts: 1,561
Reputation Power: 69
Status: Offline
Joined: Aug 12, 201013Year Member
Posts: 1,561
Reputation Power: 69
I'm pretty sure that is c++ I would ask the programming forum just in case though.
#3. Posted:
Elim8
  • Summer 2018
Status: Offline
Joined: May 04, 201211Year Member
Posts: 1,290
Reputation Power: 51
Status: Offline
Joined: May 04, 201211Year Member
Posts: 1,290
Reputation Power: 51
Most likely its a C#. Because i use similar language for scripting.
#4. Posted:
vSmithy
  • TTG Natural
Status: Offline
Joined: Jan 30, 201014Year Member
Posts: 935
Reputation Power: 45
Status: Offline
Joined: Jan 30, 201014Year Member
Posts: 935
Reputation Power: 45
Looks a lot like HTML to me.
#5. Posted:
Tab-
  • Ladder Climber
Status: Offline
Joined: Dec 26, 201211Year Member
Posts: 391
Reputation Power: 15
Status: Offline
Joined: Dec 26, 201211Year Member
Posts: 391
Reputation Power: 15
It's GSC, scripting language used by Call of Duty.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.