ItsMods

Full Version: need help with some perks and some health
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi im having problem with giving a certain team more health but I need a code and what to do with it can someone help me and I need a code for hardened pro. thanks
(04-08-2011, 01:12)rotceh_dnih Wrote: [ -> ]this might help xD http://www.itsmods.com/forum/Thread-All-...DVARS.html

But what about health? and in the dvars I saw that there was the gold camo's where do I put code for camo for a pistol or will it not work for that?
ill get back to you on the health i've not looked in to it myself but the Gold camo is called like this calcWeaponOptions(15,0,0,0,0)); 15 being the gold camo
here's a example of giveing a cold crossbow
Code:
self giveWeapon ( "crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0));
edit : and heres how to set health, in example i set health to 200 "dubble"
Code:
self.maxhealth = 200;
               self.health = 200;
(04-08-2011, 01:44)rotceh_dnih Wrote: [ -> ]ill get back to you on the health i've not looked in to it myself but the Gold camo is called like this calcWeaponOptions(15,0,0,0,0)); 15 being the gold camo
here's a example of giveing a cold crossbow
Code:
self giveWeapon ( "crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0));
edit : and heres how to set health, in example i set health to 200 "dubble"
Code:
self.maxhealth = 200;
               self.health = 200;

O so you can add that to any weapon.
(04-08-2011, 01:44)rotceh_dnih Wrote: [ -> ]ill get back to you on the health i've not looked in to it myself but the Gold camo is called like this calcWeaponOptions(15,0,0,0,0)); 15 being the gold camo
here's a example of giveing a cold crossbow
Code:
self giveWeapon ( "crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0));
edit : and heres how to set health, in example i set health to 200 "dubble"
Code:
self.maxhealth = 200;
               self.health = 200;

For the self max health how would it look for say a just random mod where would it go?
to your first qusition yes i think all guns can have gold camo, so just swap out the gun
now the health would go in with your loadout ie onplayerspawned have a loadout(); like this
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");

self thread loadout();
then the function at the bottom
Code:
loadout()
{
    self Takeallweapons();
    self giveWeapon ( "Python_Speed_mp", 0, false );     // your guns whatever
    self giveWeapon ( "crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0));
    self giveWeapon ( "knife_mp", 0, false );
    self giveWeapon ( "willy_pete_mp", 0, false );
    self giveWeapon ( "frag_grenade_mp", 0, false );
    self switchToWeapon( "Python_Speed_mp" );
    self clearPerks();
    self setPerk("specialty_bulletaccuracy");
    self setPerk("specialty_sprintrecovery");
    self setPerk("specialty_bulletpenetration"); // your perks
    self setPerk("specialty_fastreload");
    self setPerk("specialty_fastads");
    self setPerk("specialty_fallheight");

    self.maxhealth = 200;
    self.health = 200;     // HEALTH XD !!!!

}
(04-08-2011, 02:03)rotceh_dnih Wrote: [ -> ]to your first qusition yes i think all guns can have gold camo,
now the health would go in with your loadout ie onplayerspawned have a loadout(); like this
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");

self thread loadout();
then the function at the bottom
Code:
loadout()
{
    self Takeallweapons();
    self giveWeapon ( "Python_Speed_mp", 0, false );     // your guns whatever
    self giveWeapon ( "crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0));
    self giveWeapon ( "knife_mp", 0, false );
    self giveWeapon ( "willy_pete_mp", 0, false );
    self giveWeapon ( "frag_grenade_mp", 0, false );
    self switchToWeapon( "Python_Speed_mp" );
    self clearPerks();
    self setPerk("specialty_bulletaccuracy");
    self setPerk("specialty_sprintrecovery");
    self setPerk("specialty_bulletpenetration"); // your perks
    self setPerk("specialty_fastreload");
    self setPerk("specialty_fastads");
    self setPerk("specialty_fallheight");

    self.maxhealth = 200;
    self.health = 200;     // HEALTH XD !!!!

}

ahhhh ok thx whats your steam?
check your PM xD
Use some simple zombie mod and put your code into that, for example presidents would be humans and secret service zombies Wink