01-22-2014, 21:30
Pages: 1 2
01-22-2014, 22:37
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, 23:35
(01-22-2014, 22:37)8q4s8 Wrote: [ -> ]Ok, got it to workCode: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-23-2014, 01:04
(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.
01-23-2014, 11:35
are more than two weapons even possible?
01-23-2014, 11:40
if (Weapon == "iw5_striker_mp_reflex_xmags_camo08" || Weapon == "iw5_deserteagle_mp_tactical" || Weapon == "iw5_acr_mp_reflex_camo11")
01-23-2014, 16:55
01-23-2014, 21:29
(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?
01-25-2014, 11:12
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);
}
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);
}
01-26-2014, 14:47
Please use [code] tags.
Pages: 1 2