Help !giveammo Plugin doesnt work [solved]
#1
Hi everyone,
Today i want test the giveammo plugin on my server. The console shows that the plugin is enabled but i cant used the commands. Im Admin so i hve the Permission to do that but it still doesnt work.

I hope you can help me and thx in Advice.
Reply

#2
I can help you but, can you maybe post a link.
I think you mean this topic.
http://www.itsmods.com/forum/Thread-Rele...-Ammo.html ?
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#3
This plugin doesn't work because it's using GetWeaponClipSize() maybe i'll fix it for you

Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace giveammo { public class Class1 : CPlugin { public override void OnServerLoad() { ServerPrint("Give Ammo plugin loaded!"); } public override ChatType OnSay(string Message, ServerClient Client, bool Teamchat) { if (Message.ToLower().StartsWith("!giveammo")) { string[] options = Message.Split(' '); if (options.Length != 3) { TellClient(Client.ClientNum, "^2GiveAmmo: ^4Wrong options try again", true); TellClient(Client.ClientNum, "^2GiveAmmo: ^4Format:!giveammo [playername] [ammo]", true); } else { string name = options[1]; string ammo = options[2]; if (name.ToLower() == "me") { Client.Ammo.PrimaryAmmoClip += Convert.ToInt32(ammo); } if (name.ToLower() == "all") { foreach (ServerClient client in GetClients()) { Client.Ammo.PrimaryAmmoClip += Convert.ToInt32(ammo); } } else { foreach (ServerClient client in GetClients()) { if (client.Name.ToLower().Contains(name.ToLower())) { Client.Ammo.PrimaryAmmoClip += Convert.ToInt32(ammo); } } } } return ChatType.ChatNone; } else { return ChatType.ChatContinue; } } } }

I removed the GetWeaponClipSize() stuff. Now it's just adding the value to the ammoclip


Attached Files
.zip   GiveAmmo.zip (Size: 2.33 KB / Downloads: 65)
Reply

#4
(12-29-2012, 16:29)8q4s8 Wrote: This plugin doesn't work because it's using GetWeaponClipSize() maybe i'll fix it for you

Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace giveammo { public class Class1 : CPlugin { public override void OnServerLoad() { ServerPrint("Give Ammo plugin loaded!"); } public override ChatType OnSay(string Message, ServerClient Client, bool Teamchat) { if (Message.ToLower().StartsWith("!giveammo")) { string[] options = Message.Split(' '); if (options.Length != 3) { TellClient(Client.ClientNum, "^2GiveAmmo: ^4Wrong options try again", true); TellClient(Client.ClientNum, "^2GiveAmmo: ^4Format:!giveammo [playername] [ammo]", true); } else { string name = options[1]; string ammo = options[2]; if (name.ToLower() == "me") { Client.Ammo.PrimaryAmmoClip += Convert.ToInt32(ammo); } if (name.ToLower() == "all") { foreach (ServerClient client in GetClients()) { Client.Ammo.PrimaryAmmoClip += Convert.ToInt32(ammo); } } else { foreach (ServerClient client in GetClients()) { if (client.Name.ToLower().Contains(name.ToLower())) { Client.Ammo.PrimaryAmmoClip += Convert.ToInt32(ammo); } } } } return ChatType.ChatNone; } else { return ChatType.ChatContinue; } } } }

I removed the GetWeaponClipSize() stuff. Now it's just adding the value to the ammoclip

Thank you so much Big Grin.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,512 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,606 11-08-2013, 19:13
Last Post: clemi555
  Help Modifying plugin maverigh 5 7,657 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,315 10-19-2013, 06:59
Last Post: iRoNinja
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,663 09-13-2013, 09:31
Last Post: Hallla
  Search Plugin Fluid Killcam N3xT_974 1 3,983 09-10-2013, 20:27
Last Post: Nekochan
  Help [C#] WebClient how to know real url [solved] narkos 21 17,919 09-09-2013, 15:21
Last Post: surtek
  !kill Plugin Hallla 1 3,507 09-07-2013, 22:30
Last Post: axel-le-meilleur
  God Mode Plugin - Everyone has rcon admin srskiller 4 7,845 08-28-2013, 19:03
Last Post: phillipito
  Donator Status Plugin tubwux 1 2,940 08-28-2013, 07:13
Last Post: DidUknowiPwn

Forum Jump:


Users browsing this thread:
1 Guest(s)

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