Raised This Month: $ Target: $400
 0% 

One shot in fiveseven and some other stuff : hNs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 12-22-2007 , 14:37   Re: One shot in fiveseven and some other stuff : hNs
Reply With Quote #2

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);
  }
 }
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode