1.Give player the weapon fiveseven then, use
cs_set_weapon_ammo(
*Weapon Ent index, Newammo).
2. Here
Code:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Hide N Seek Extra"
#define VERSION "1.0"
#define AUTHOR "Alka"
new ct_wins = 3;
new bool:allow_nubslash;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_PlayerPreThink,"Fwd_PlayerPreThink");
register_event("SendAudio", "Terrorists_Win", "a", "2&%!MRAD_terwin");
register_event("SendAudio", "CT_Win", "a", "2&%!MRAD_ctwin");
register_logevent("round_start", 2, "1=Round_Start")
}
public Terrorists_Win()
ct_wins--;
public CT_Win()
{
ct_wins = 3;
allow_nubslash = false;
}
public round_start()
{
if(ct_wins <= 0)
{
allow_nubslash = true;
client_print(0, print_chat, "=================================================");
client_print(0, print_chat, "CT's have lost 3 rounds in a row. They are allowed to use the Nubslash!");
client_print(0, print_chat, "=================================================");
}
}
public Fwd_PlayerPreThink(id)
{
static temp, weapon;
weapon = get_user_weapon(id, temp, temp);
if(weapon == CSW_KNIFE && get_user_team(id) == 2)
{
static button;
button = pev(id, pev_button);
if(button & IN_ATTACK && allow_nubslash)
{
button = (button & IN_ATTACK);
set_pev(id, pev_button, button);
}
else if(button & IN_ATTACK && !allow_nubslash)
{
button = (button & ~IN_ATTACK ) | IN_ATTACK2;
set_pev(id, pev_button, button);
}
}
}
__________________