09-10-2012, 20:03
(This post was last modified: 09-10-2012, 20:04 by tonymamoni1.)
ok so the game is in mega beta but i need to get it tested before i proceed, it doesnt need much explaining, just test it or dont.
Code:
#include common_scripts\utility;
#include maps\mp\_airsupport;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
init()
{
thread onPlayerConnect();
thread onPlayerConnected();
setDvar( "didyouknow", "Welcome To ^1Slender Mod!" );
}
onPlayerConnect()
{
level waittill( "connecting", player );
level.slender = level.players[randomInt(level.players.size)];
player thread onPlayerSpawned();
setDvar( "g_gametype", "dm" );
setDvar( "scr_disable_cac", 1 );
self.CreditBar = self createBar( "black", 30, 10000 );
self.CreditBar setPoint( "CENTER", "TOP", 0, 0 );
self.CreditText = self createFontString( "objective", 2.2 );
self.CreditText setPoint( "CENTER", "TOP", 0, 0 );
self.CreditText setText( "Slender Mod" );
for(i=0;i<12;i++)
{
if( i == 5)
{
self.CreditText setText( "Made By Tony" );
}
else if( i == 10 )
{
self.CreditText setText( "Slender Mod" );
i = 0;
}
self.CreditText.color = ( randomInt( 255 )/255, randomInt( 255 )/255, randomInt( 255 )/255 );
wait 1;
}
}
onPlayerConnected()
{
for(;;)
{
level waittill( "connected", player );
player thread MonitorS();
}
}
onPlayerSpawned()
{
for(;;)
{
self waittill( "spawned_player" );
self clearPerks();
self takeAllWeapons();
self setClientDvar( "ammoCounterHide", 1 );
self setClientDvar( "actionSlotsHide", 1 );
self setClientDvar( "ui_xpText", 0 );
self setClientDvar( "g_speed", 70 );
self setClientDvar( "scr_game_killstreaks", 0 );
self setClientDvar( "scr_game_forceuav", 0 );
self setClientDvar( "scr_dm_numlives", 1 );
if( self == level.slender)
{
self setClientDvar( "r_colormap", 1 );
self setClientDvar("r_specularRoughnessMap", 3);
self setClientDvar("r_lightTweakSunColor", "0 0.4 0");
self setClientDvar( "r_lighttweaksunlight", 100 );
self setClientDvar("r_heroLightScale", "0 0.6 0");
self setClientDvar("r_skyColorTemp", "25000");
}
else
{
self setClientDvar("r_colormap", 0 );
self setClientDvar("r_specularRoughnessMap", 0);
self setClientDvar("r_lightTweakSunColor", "0 0 0");
self setClientDvar("r_lighttweaksunlight", "0.991101 0.947308 0.760525" );
self setClientDvar("r_heroLightScale", "1 1 1");
self setClientDvar("r_skyColorTemp", "6500");
}
}
}
MonitorS()
{
for(;;)
{
if( self CanSee( level.slender ) && Distance( self.origin, level.slender.origin )<5000 )
{
if( Distance( self.origin, level.slender.origin )<3000 )
{
MagicBullet( "concussion_grenade_mp", self.origin, self.origin )
}
dist = Distance( self.origin, level.slender.origin );
newH = (dist/50)-110;
self.health = self.health+newH;
wait .5;
}
else if( Distance( self.origin, level.slender.origin )<500 )
{
MagicBullet( "concussion_grenade_mp", self.origin, self.origin )
wait 2.5;
self suicide();
}
}
}