ItsMods

Full Version: Plugin no work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hey i am new here can sombody help me becouse i dont know why this no working



Code:
using System;
using System.Collections.Generic;
using Addon;
using System.Text;

namespace ClassLibrary1
{
    public class Class1 : CPlugin
    {
        public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation)
        {
            if (Weapon == "iw5_44magnum_mp_tactical")
            {
                Damage = 750;
            }
            return Damage;
        }
    }
}
Try replace "Damage=750;" by "return 750;" also try to make "OnServerLoad" method and put ServerPrint or whatever in it to see if it even loads.
if (Weapon.Contains("44magnum_mp_tactical"))
(07-24-2014, 22:00)hillbilly Wrote: [ -> ]if (Weapon.Contains("44magnum_mp_tactical"))

this no working ,I testing this on bots infected idk is somthing chang maybe becouse they are bots




Sry for my English
If you are using my bots plugin damages are setup so bots take a certain damage..
(07-25-2014, 03:00)Casper Wrote: [ -> ]If you are using my bots plugin damages are setup so bots take a certain damage..

yes I using your bots plugin, if I good understanding on normal players will work normal ?
yes....
thanks very much for help
now is working but all guns flesh stund fall damage and more have 750 damage what is wrong
Code:
using System;
using System.Collections.Generic;
using Addon;
using System.Text;

namespace ClassLibrary1
{
    public class Class1 : CPlugin
    {
        public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation)
        {
            if (Weapon == "iw5_barrett_mp_xmags_camo11" || Weapon == "iw5_rsass_mp_xmags_camo11" || Weapon == "iw5_dragunov_mp_xmags_camo11" || Weapon == "iw5_msr_mp_xmags_camo11" || Weapon == "iw5_l96a1_mp_xmags_camo11" || Weapon == "iw5_as50_mp_xmags_camo11" || Weapon == "iw5_44magnim_mp_tactical_xmags" )
            {
                Damage = 750;
            }
            return Damage;
        }
    }
}
Add the second '('.
Like
Code:
if( ( something || something1 ) )