This commit is contained in:
INeedBots 2020-09-26 00:32:05 -06:00
parent 7b0a68d8aa
commit 5b1c3f0576
2 changed files with 59 additions and 0 deletions

View File

@ -478,6 +478,7 @@ set sv_enableBounces "1"
// CUSTOM
set scr_showHP "1"
set scr_allowFPSBooster "1"
// _bot

View File

@ -0,0 +1,58 @@
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
init()
{
setDvarIfUninitialized( "scr_showHP", false );
level.showHP = getDvarInt("scr_showHP");
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player);
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
if(level.showHP)
self thread drawHP();
}
}
destoryHPdraw()
{
self waittill_either("disconnect", "death");
self.drawHP destroy();
}
initHPdraw()
{
self.drawHP = self createFontString("default", 1.2);
self.drawHP setPoint("BOTTOMRIGHT", "BOTTOMRIGHT", -150, -20);
self thread destoryHPdraw();
}
drawHP()
{
self endon( "disconnect" );
self endon( "death" );
self initHPdraw();
for(;;)
{
//self.drawHP setText("HP: "+self.health+" KS: "+self.pers["cur_kill_streak"]);
self.drawHP setText(self.health);
wait 0.05;
}
}