sm-zombiereloaded-3/src/zr/playerclasses/clientalpha.inc

29 lines
780 B
PHP
Raw Normal View History

/*
* ============================================================================
*
* Zombie:Reloaded
*
* File: clientalpha.inc
* Type: Core
* Description: Handles transparency on clients.
*
* ============================================================================
*/
/**
* Updates the alpha value on a player.
*/
ClassAlphaUpdate(client)
{
new current_health = GetClientHealth(client);
new max_health = ClassGetHealth(client);
new max_damage = ClassGetAlphaDamage(client);
// Calculate if enough damage is done to change alpha.
if ((max_health - current_health) > max_damage)
{
new alpha_damaged = ClassGetAlphaDamaged(client);
2009-04-29 01:58:41 +02:00
ToolsSetClientAlpha(client, alpha_damaged);
}
}