Hey guys it's me again,
now I need a plugin, which gives Admins, mods and VIP's some weapons with attachments, like FMG akimbo, ACR with silencer, ...
Normal user shouldn't have this permission.
Example: !fmg - Gives FMG akimbo
!acr - Gives ACR with silencer and extended mags
And if possible pls make a command for admins, VIP's and mods, to get double health and double speed.
I don't think if someone will do it.
It's very easy. Just simple statements.
Well, if someone gives me the code for weapons with attachments I could try it
Thanks, just a question: is it possible to add more than just 1 weapon perk and attachments? And what does the "_01" mean?
(12-10-2013, 17:45)xxxLik3aB0SSxxx Wrote: [ -> ]Thanks, just a question: is it possible to add more than just 1 weapon perk and attachments? And what does the "_01" mean?
opps thats _silencer_01
and i have had three attachments on a couple of weapons
Thanks, and how can I add camo? Just add _gold?
Now I'm so far:
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)
{
string str = Message.ToLower();
if (str.StartsWith("!lol"))
{
Client.Other.SetPlayerModel("mp_fullbody_opforce_juggernaut");
}
if (str.StartsWith("!allperks"))
{
Client.Other.SetPerk(GetPerk("all_perks_bonus"));
}
if (str.StartsWith("!acr"))
{
if (Client.Team == Teams.Allies)
{
Client.Other.PrimaryWeapon = GetWeapon("iw5_acr_mp_specialty_bulletpenetration_specialty_marksman_specialty_armorpiercing_specialty_longerrange_specialty_moredamage_specialty_lightweight_xmags_silencer_01_camo12");
Client.Ammo.PrimaryAmmoClip = 250;
}
else
{
iPrintLnBold("^1You're not in the right team!", Client);
}
}
return ChatType.ChatNone;
if (str.StartsWith("!ump"))
{
if (Client.Team == Teams.Allies)
{
Client.Other.PrimaryWeapon = GetWeapon("iw5_ump45_mp_specialty_bulletpenetration_specialty_marksman_specialty_armorpiercing_specialty_longerrange_specialty_moredamage_specialty_lightweight_xmags_silencer_01_camo12");
Client.Ammo.PrimaryAmmoClip = 250;
}
else
{
iPrintLnBold("^1You're not in the right team!", Client);
}
}
return ChatType.ChatNone;
if (str.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 (str.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 (str.StartsWith("!health"))
{
if (Client.Team == Teams.Axis)
{
Client.Other.Health = 200;
}
else
{
iPrintLnBold("^1You're not in the right team!", Client);
}
}
return ChatType.ChatNone;
if (str.StartsWith("!speed"))
{
if (Client.Team == Teams.Axis)
{
Client.Other.SpeedScale = 1.5f;
}
else
{
iPrintLnBold("^1You're not in the right team!", Client);
}
}
return ChatType.ChatNone;
}
}
}
Is there any mistake? Do you think this will work?
Put the 'return ChatType.ChatNone' inside of statement(s).
I mean:
Your code:
Code:
if (str.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;
But it should be..
Code:
if (str.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;
}