PHP Code:
devgui_unlimited_ammo()
{
self notify( "devgui_unlimited_ammo" );
self endon( "devgui_unlimited_ammo" );
self endon( "disconnect" );
for ( ;; )
{
wait( 0.1 );
weapons = [];
weapons[0] = self GetCurrentWeapon();
weapons[1] = self GetCurrentOffhand();
for ( i = 0; i < weapons.size; i++ )
{
if ( weapons[i] == "none" )
continue;
self GiveMaxAmmo( weapons[i] );
}
}
}
PHP Code:
devgui_health_debug()
{
self notify( "devgui_health_debug" );
self endon( "devgui_health_debug" );
self endon( "disconnect" );
x = 80;
y = 40;
self.debug_health_bar = NewClientHudElem( self );
self.debug_health_bar.x = x + 80;
self.debug_health_bar.y = y + 2;
self.debug_health_bar.alignX = "left";
self.debug_health_bar.alignY = "top";
self.debug_health_bar.horzAlign = "fullscreen";
self.debug_health_bar.vertAlign = "fullscreen";
self.debug_health_bar.alpha = 1;
self.debug_health_bar.foreground = 1;
self.debug_health_bar setshader( "black", 1, 8 );
self.debug_health_text = NewClientHudElem( self );
self.debug_health_text.x = x + 80;
self.debug_health_text.y = y;
self.debug_health_text.alignX = "left";
self.debug_health_text.alignY = "top";
self.debug_health_text.horzAlign = "fullscreen";
self.debug_health_text.vertAlign = "fullscreen";
self.debug_health_text.alpha = 1;
self.debug_health_text.fontScale = 1;
self.debug_health_text.foreground = 1;
for ( ;; )
{
wait ( 0.05 );
width = self.health / self.maxhealth * 300;
width = int( max( width, 1 ) );
self.debug_health_bar setShader( "black", width, 8 );
self.debug_health_text SetValue( self.health );
}
}
PHP Code:
SetDvar( "debug_show_viewpos", "0" );