ItsMods

Full Version: another command problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I found this command inside _customclasses:

Quote:getHealthRegenModifier()
{
regen = 0.1;
if( isDefined( self.class_num ) && isDefined( self.custom_class[ self.class_num ][ "healthRegeneration" ] ) )
{
switch( self.custom_class[ self.class_num ][ "healthRegeneration" ] )
{
case 1:
regen = 0.0;
break;
case 2:
regen = 0.01;
break;
case 3:
regen = 0.05;
break;
case 5:
regen = 0.2;
break;
case 6:
regen = 0.4;
break;
}
}
return regen;

if i want a class to regen 0.05 how do i put it into this lines?:

Quote:if( response == "vampireI" )
{
self giveWeapon( "l96a1_mp" );
self switchToWeapon( "l96a1_mp" );

{
self SetMoveSpeedScale( 1.2 );
wait 0.05;
}



}
Code:
self.custom_class[ self.class_num ][ "healthRegeneration" ] = 3;
?
I dunno what you're asking..
would that work?
Is "vampire1" a custom class? If so, find what index it is and change the regen accordingly. So if the index is 5, change this section:

PHP Code:
case 5:
regen 0.2;
break; 

to

PHP Code:
case 5:
regen 0.05;
break; 

As Pozzuh said, your question is a bit unclear, provide more information if you can.