ItsMods
Help Help me with a code (who knows) - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: Help Help me with a code (who knows) (/Thread-Help-Help-me-with-a-code-who-knows.html)



Help me with a code (who knows) - NyZzE - 04-03-2013

hey hello help me, is possible to make what axis (zombie)
I want to make that zombies could use for example riotshield only once for the death . you can give an approximate code on it? who knows . thanks Smile

Code:
using System; using Addon; using System.Timers; namespace plugin_test_BlackDay { //" : CPlugin" Black Day public class plugin_test_BlackDay : CPlugin { // Black Day bool mp5 = false; // public override void OnMapChange() { mp5 = false; } public override void OnServerLoad() { ServerPrint("**NyZzE Black Day_Load**"); } public void NyZzEFunc(ServerClient Client) { iPrintLnBold("^1|akimbo Load ^2" + Client.Name + "", null); int mp5 = GetWeapon("iw5_riotshield_mp"); Client.Other.MaxHealth = 170; Client.Other.Health = 170; } public override ChatType OnSay(string Message, ServerClient Client) { ServerPrint("Player " + Client.Name + "said " + Message); if (Client.Team == Teams.Allies) { if (Message == "!1") { if (mp5 == true) { NyZzEFunc(Client); return ChatType.ChatNone; } else if (mp5 == false) { TellClient(Client.ClientNum, "^1", true); return ChatType.ChatNone; } } } else if (Client.Team == Teams.Axis) { if (Message == "!1") { TellClient(Client.ClientNum, "^1", true); return ChatType.ChatNone; } } return ChatType.ChatContinue; } } }



RE: Help me with a code (who knows) - 8q4s8 - 04-03-2013

Example for damage increase:
Code:
public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage) { if (Attacker.Team == Teams.Axis && Weapon == "riotshield_mp") { Damage = 100; } return Damage; }



RE: Help me with a code (who knows) - NyZzE - 04-05-2013

[img] [Image: 3c9b71f4cefa9a3ad569f9808f638025.jpg] 1920x1080(390.54 kB) [/img]
(04-03-2013, 20:47)8q4s8 Wrote: Example for damage increase:
Code:
public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage) { if (Attacker.Team == Teams.Axis && Weapon == "riotshield_mp") { Damage = 100; } return Damage; }

thanks