tweak cod rcon connection and fix max health for hide integration command

This commit is contained in:
RaidMax
2022-03-05 13:13:00 -06:00
parent 59ca399045
commit acf66da4ca
3 changed files with 107 additions and 118 deletions

View File

@ -128,6 +128,11 @@ DisplayWelcomeData()
PlayerConnectEvents()
{
self endon( "disconnect" );
if ( IsDefined( self.isHidden ) && self.isHidden )
{
self HideImpl();
}
clientData = self.pers[level.clientDataKey];
@ -591,18 +596,17 @@ HideImpl()
return;
}
if ( IsDefined( self.isHidden ) && self.isHidden )
{
self IPrintLnBold( "You are already hidden" );
return;
}
self SetClientDvar( "sv_cheats", 1 );
self SetClientDvar( "cg_thirdperson", 1 );
self SetClientDvar( "sv_cheats", 0 );
self.savedHealth = self.health;
self.health = 9999;
if ( !IsDefined( self.savedHealth ) || self.health < 1000 )
{
self.savedHealth = self.health;
}
self.maxhealth = 99999;
self.health = 99999;
self.isHidden = true;
self Hide();