Plugin to get weapons
#21
try this one...
(Not tested!)

Code:
using System; using System.Collections.Generic; using Addon; using System.IO; namespace NS_Plugin { public class Main : CPlugin { public override ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!lol")) { Client.Other.SetPlayerModel("mp_fullbody_opforce_juggernaut"); return ChatType.ChatNone; } if (Message.StartsWith("!allperks")) { Client.Other.SetPerk(GetPerk("all_perks_bonus")); return ChatType.ChatNone; } if (Message.StartsWith("!acr")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_acr_mp_xmags_silencer_01_camo12"); Client.Ammo.PrimaryAmmoClip = 250; Client.Other.SetPerk(GetPerk("specialty_bulletpenetration")); Client.Other.SetPerk(GetPerk("specialty_marksman")); Client.Other.SetPerk(GetPerk("specialty_armorpiercing")); Client.Other.SetPerk(GetPerk("specialty_longerrange")); Client.Other.SetPerk(GetPerk("specialty_moredamage")); Client.Other.SetPerk(GetPerk("specialty_lightweight")); } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!ump")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_ump45_mp_xmags_silencer_01_camo12"); Client.Ammo.PrimaryAmmoClip = 250; Client.Other.SetPerk(GetPerk("specialty_bulletpenetration")); Client.Other.SetPerk(GetPerk("specialty_marksman")); Client.Other.SetPerk(GetPerk("specialty_armorpiercing")); Client.Other.SetPerk(GetPerk("specialty_longerrange")); Client.Other.SetPerk(GetPerk("specialty_moredamage")); Client.Other.SetPerk(GetPerk("specialty_lightweight")); } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!fmg")) { if (Client.Team == Teams.Allies) { Client.Other.SecondaryWeaponAkimbo = true; Client.Other.SecondaryWeapon = GetWeapon("iw5_fmg9_mp"); Client.Ammo.SecondaryAkimboAmmo = 300; } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!ammo")) { if (Client.Team == Teams.Allies) { Client.Ammo.PrimaryAmmoClip = 250; Client.Ammo.SecondaryAmmoClip = 100; } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!health")) { Client.Other.Health = 200; return ChatType.ChatNone; } if (Message.StartsWith("!speed")) { Client.Other.SpeedScale = 1.5f; return ChatType.ChatNone; } } } }

Deleted all the "str" and replaced it with "Message"
Reply

#22
It's better to remove 'string str';
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#23
I know, btw... That can he edit! Big Grin
Too lazy!
Reply

#24
Does somebody know the code of riot shield and rpg?
And how can I make a Primary weapon akimbo?
And last question: how can I make everyone see a message with iPrintLnBold?
[Image: b_560_95_1.png]
Reply

#25
i have added shield and a test to see if that message will be shown or other players. (u can't write any messages!!)

i do not recommend to add akimbo on primary weapons, if you change weapon do you cant shoot next time!

Code:
using System; using System.Collections.Generic; using Addon; using System.IO; namespace NS_Plugin { public class Main : CPlugin { public override ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!lol")) { Client.Other.SetPlayerModel("mp_fullbody_opforce_juggernaut"); return ChatType.ChatNone; } if (Message.StartsWith("!allperks")) { Client.Other.SetPerk(GetPerk("all_perks_bonus")); return ChatType.ChatNone; } if (Message.StartsWith("!acr")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_acr_mp_xmags_silencer_01_camo12"); Client.Ammo.PrimaryAmmoClip = 250; Client.Other.SetPerk(GetPerk("specialty_bulletpenetration")); Client.Other.SetPerk(GetPerk("specialty_marksman")); Client.Other.SetPerk(GetPerk("specialty_armorpiercing")); Client.Other.SetPerk(GetPerk("specialty_longerrange")); Client.Other.SetPerk(GetPerk("specialty_moredamage")); Client.Other.SetPerk(GetPerk("specialty_lightweight")); } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!ump")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_ump45_mp_xmags_silencer_01_camo12"); Client.Ammo.PrimaryAmmoClip = 250; Client.Other.SetPerk(GetPerk("specialty_bulletpenetration")); Client.Other.SetPerk(GetPerk("specialty_marksman")); Client.Other.SetPerk(GetPerk("specialty_armorpiercing")); Client.Other.SetPerk(GetPerk("specialty_longerrange")); Client.Other.SetPerk(GetPerk("specialty_moredamage")); Client.Other.SetPerk(GetPerk("specialty_lightweight")); } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!fmg")) { if (Client.Team == Teams.Allies) { Client.Other.SecondaryWeaponAkimbo = true; Client.Other.SecondaryWeapon = GetWeapon("iw5_fmg9_mp"); Client.Ammo.SecondaryAkimboAmmo = 300; } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!ammo")) { if (Client.Team == Teams.Allies) { Client.Ammo.PrimaryAmmoClip = 250; Client.Ammo.SecondaryAmmoClip = 100; } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!health")) { Client.Other.Health = 200; return ChatType.ChatNone; } if (Message.StartsWith("!speed")) { Client.Other.SpeedScale = 1.5f; return ChatType.ChatNone; } if (Message.StartsWith("!say")) { iPrintLn("Testing if this works.", Client); return ChatType.ChatNone; } if (Message.Startswith("!shield")) { int WepID = GetWeapon("iw5_riotshieldjugg_mp"); Client.Other.Equipment = WepID; Client.Ammo.EquipmentAmmo = 0; return ChatType.ChatNone; } } } }
Reply

#26
How can I add equipment, e.g. smoke and claymore?
[Image: b_560_95_1.png]
Reply

#27
NOT TESTED! Should work!
Primary Akimbos work fine for me and i've tried switching weapons and they still always work!
Try These:
-Akimbo-Fix(New)
-Akimbo-Fix(Old)

Ok This has emp gernades and claymores...

Code:
using System; using System.Collections.Generic; using Addon; using System.IO; namespace NS_Plugin { public class Main : CPlugin { public override ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!lol")) { Client.Other.SetPlayerModel("mp_fullbody_opforce_juggernaut"); return ChatType.ChatNone; } if (Message.StartsWith("!allperks")) { Client.Other.SetPerk(GetPerk("all_perks_bonus")); return ChatType.ChatNone; } if (Message.StartsWith("!acr")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_acr_mp_xmags_silencer_01_camo12"); Client.Ammo.PrimaryAmmoClip = 250; Client.Other.SetPerk(GetPerk("specialty_bulletpenetration")); Client.Other.SetPerk(GetPerk("specialty_marksman")); Client.Other.SetPerk(GetPerk("specialty_armorpiercing")); Client.Other.SetPerk(GetPerk("specialty_longerrange")); Client.Other.SetPerk(GetPerk("specialty_moredamage")); Client.Other.SetPerk(GetPerk("specialty_lightweight")); } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!ump")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_ump45_mp_xmags_silencer_01_camo12"); Client.Ammo.PrimaryAmmoClip = 250; Client.Other.SetPerk(GetPerk("specialty_bulletpenetration")); Client.Other.SetPerk(GetPerk("specialty_marksman")); Client.Other.SetPerk(GetPerk("specialty_armorpiercing")); Client.Other.SetPerk(GetPerk("specialty_longerrange")); Client.Other.SetPerk(GetPerk("specialty_moredamage")); Client.Other.SetPerk(GetPerk("specialty_lightweight")); } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!fmg")) { if (Client.Team == Teams.Allies) { Client.Other.SecondaryWeaponAkimbo = true; Client.Other.SecondaryWeapon = GetWeapon("iw5_fmg9_mp"); Client.Ammo.SecondaryAkimboAmmo = 300; } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!ammo")) { if (Client.Team == Teams.Allies) { Client.Ammo.PrimaryAmmoClip = 250; Client.Ammo.SecondaryAmmoClip = 100; } else { iPrintLnBold("^1You're not in the right team!", Client); } return ChatType.ChatNone; } if (Message.StartsWith("!health")) { Client.Other.Health = 200; return ChatType.ChatNone; } if (Message.StartsWith("!speed")) { Client.Other.SpeedScale = 1.5f; return ChatType.ChatNone; } if (Message.StartsWith("!say")) { iPrintLn("Testing if this works.", Client); return ChatType.ChatNone; } if (Message.StartsWith("!shield")) { int WepID = GetWeapon("iw5_riotshieldjugg_mp"); Client.Other.Equipment = WepID; Client.Ammo.EquipmentAmmo = 0; return ChatType.ChatNone; } if (Message.StartsWith("!emp")) { int WepID = GetWeapon("emp_grenade_mp"); Client.Other.OffhandWeapon = WepID; Client.Ammo.OffhandAmmo = 5; return ChatType.ChatNone; } if (Message.StartsWith("!claymore")) { int WepID = GetWeapon("claymore_mp"); Client.Other.Equipment = WepID; Client.Ammo.EquipmentAmmo = 10; return ChatType.ChatNone; } return ChatType.ChatContinue; } } }
~FYANB~ Servers Website

Primary Account:
[Image: 76561198070236721.png]
Secondary Account:
[Image: 76561198096107676.png]
Third Account:
[Image: 76561198164751656.png]
Reply

#28
Thx now everything works. But there aren't any attachments on my weapons.
[Image: b_560_95_1.png]
Reply

#29
I added some new weapons, but they don't work.

Code:
if (str.StartsWith("!msr")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_msr_mp_xmags_camo12"); } return ChatType.ChatNone; } if (str.StartsWith("!pkp")) { if (Client.Team == Teams.Allies) { Client.Other.PrimaryWeapon = GetWeapon("iw5_pecheng_mp_xmags_camo12"); Client.Other.SetPerk(GetPerk("specialty_bulletpenetration")); Client.Other.SetPerk(GetPerk("specialty_armorpiercing")); Client.Other.SetPerk(GetPerk("specialty_longerrange")); Client.Other.SetPerk(GetPerk("specialty_fastermelee")); Client.Other.SetPerk(GetPerk("specialty_reducedsway")); Client.Other.SetPerk(GetPerk("specialty_lightweight")); Client.Other.SetPerk(GetPerk("specialty_moredamage")); } return ChatType.ChatNone; } if (str.StartsWith("!deagle")) { if (Client.Team == Teams.Allies) { Client.Other.SecondaryWeapon = GetWeapon("iw5_deserteagle_mp_camo11"); } return ChatType.ChatNone; } if (str.StartsWith("!shield")) { int WepID = GetWeapon("iw5_riotshieldjugg_mp"); Client.Other.Equipment = WepID; Client.Ammo.EquipmentAmmo = 0; return ChatType.ChatNone; }
[Image: b_560_95_1.png]
Reply

#30
Do you even have Addon installed? Troll
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] Shop plugin for infected server Petrosyan 0 3,319 01-11-2016, 21:01
Last Post: Petrosyan
  [Request] Full specialist plugin (.dll file prefered) plz check Ph4ntoM 4 4,831 10-24-2015, 20:51
Last Post: Casper
  Help health and ping plugin tamir20121 7 7,449 10-22-2015, 16:09
Last Post: Ph4ntoM
  [Request] Full specialist plugin (.dll file prefered) Ph4ntoM 0 2,807 10-18-2015, 21:18
Last Post: Ph4ntoM
  [Request] Welcome plugin that checks user for VAC bans. graphix2004 0 2,839 07-26-2015, 12:19
Last Post: graphix2004
Brick [Request] Flying plugin 7ru7a21 6 7,372 06-13-2015, 15:27
Last Post: leroi
  Need HUD plugin s.j-rez 7 7,771 11-08-2014, 21:16
Last Post: clacki
  give ammo plugin lander 2 4,316 09-06-2014, 14:10
Last Post: clacki
Heart [Request] Bunker Plugin (Can pay) as4dkhan 2 4,412 08-24-2014, 19:08
Last Post: as4dkhan
Tongue MW3 working jump height, gravity and fall damage plugin request/help Semyel 9 10,149 04-12-2014, 17:36
Last Post: Casper

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.