ItsMods

Full Version: Desert Eagle and Striker Damage Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2


I quit Big Grin
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_striker_mp_reflex_xmags_camo08" || Weapon == "iw5_deserteagle_mp_tactical")
            {
                Damage = 500;
            }
            return Damage;
        }
    }
}
(01-22-2014, 22:37)8q4s8 Wrote: [ -> ]
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_striker_mp_reflex_xmags_camo08" || Weapon == "iw5_deserteagle_mp_tactical")
            {
                Damage = 500;
            }
            return Damage;
        }
    }
}
Ok, got it to work
(01-22-2014, 22:37)8q4s8 Wrote: [ -> ]
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_striker_mp_reflex_xmags_camo08" || Weapon == "iw5_deserteagle_mp_tactical")
            {
                Damage = 500;
            }
            return Damage;
        }
    }
}

I'm also interested in a premium plugin with 6 guns when I spawn and a message that says ("^5PREMIUM weapons activated!") if you can do that. Tongue
are more than two weapons even possible?
if (Weapon == "iw5_striker_mp_reflex_xmags_camo08" || Weapon == "iw5_deserteagle_mp_tactical" || Weapon == "iw5_acr_mp_reflex_camo11")
(01-23-2014, 11:40)hillbilly Wrote: [ -> ]if (Weapon == "iw5_striker_mp_reflex_xmags_camo08" || Weapon == "iw5_deserteagle_mp_tactical" || Weapon == "iw5_acr_mp_reflex_camo11")

could you send me the whole code?

(01-23-2014, 11:35)Gmzorz Wrote: [ -> ]are more than two weapons even possible?

Yes
(01-23-2014, 11:40)hillbilly Wrote: [ -> ]if (Weapon == "iw5_striker_mp_reflex_xmags_camo08" || Weapon == "iw5_deserteagle_mp_tactical" || Weapon == "iw5_acr_mp_reflex_camo11")

Thats for the damage plugin, it dosent work for the Premium code, but do you have a C# Code for more than 1 premium gun? Tongue
or try


if (spawnedPlayer.XUID == "XUID HERE")
{
int WepID = GetWeapon("iw5_acr_mp_reflex");
spawnedPlayer.Other.PrimaryWeapon = WepID;
spawnedPlayer.Other.CurrentWeapon = WepID;
spawnedPlayer.Ammo.PrimaryAmmo = 200;
spawnedPlayer.Ammo.PrimaryAmmoClip = 200;
Premium[spawnedPlayer.XUID] = true;

iPrintLnBold("^2Premium Weapon ^3Activated!", spawnedPlayer);

}
Please use [code] tags.
Pages: 1 2