ItsMods

Full Version: health and damage command
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello i need the commands to set health. and the command to set damage on a specific class or weapon
Code:
self.maxhealth = 100;
self.health = self.maxhealth;

Damage is a little bit more complicated.
(07-14-2011, 22:14)Lemon Wrote: [ -> ]
Code:
self.maxhealth = 100;
self.health = self.maxhealth;

Damage is a little bit more complicated.

thanks how would you put it into this lines?
Quote:else if( response == "HunterIII" )
{
self giveWeapon( "m60mod_mp" );
self switchToWeapon( "m60mod_mp" );
self giveWeapon( "crossbow_explosive_mp" );
self setPerk( "specialty_fastreload" );
self setPerk( "specialty_fastads" );
self giveWeapon( "sticky_grenade_mp" );
self giveWeapon( "knife_mp" );
self giveWeapon( "satchel_charge_mp" );
self setPerk( "specialty_quieter" );
self setPerk( "specialty_twogrenades" );
self.damage = "0.1";


{
self SetMoveSpeedScale( 0.8 );
wait 0.05;
}



}
Quote:else if( response == "HunterIII" )
{
self giveWeapon( "m60mod_mp" );
self switchToWeapon( "m60mod_mp" );
self giveWeapon( "crossbow_explosive_mp" );
self setPerk( "specialty_fastreload" );
self setPerk( "specialty_fastads" );
self giveWeapon( "sticky_grenade_mp" );
self giveWeapon( "knife_mp" );
self giveWeapon( "satchel_charge_mp" );
self setPerk( "specialty_quieter" );
self setPerk( "specialty_twogrenades" );
self.damage = "0.1";

self.maxhealth = 100;
self.health = self.maxhealth;


{
self SetMoveSpeedScale( 0.8 );
wait 0.05;
}



}
You can change the weapon damage in the asset manager.
1.Open AM
2.Choose your weapon
3.Make your changes
4. Press F10
5. Go to raw/weapons/mp and copy the wep
6. Add it to your mod

u could do something with th callback setup gsc too.
ok thanks everyone i give you a thankyou and rep+ Big Grin
allso 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;
}



}