Raised This Month: $ Target: $400
 0% 

Force a player to pull out his/her primary


  
 
 
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-25-2007 , 14:49   Re: Force a player to pull out his/her primary
Reply With Quote #2

I think i'll do something like this
Code:
#include <amxmodx>
 
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Unknown"
 
#define PRIMARY_WEAPONS ((1<<CSW_SCOUT) | (1<<CSW_XM1014) | (1<<CSW_MAC10) | (1<<CSW_AUG) | (1<<CSW_UMP45) | (1<<CSW_SG550) | (1<<CSW_GALIL) | (1<<CSW_FAMAS) | (1<<CSW_AWP) | (1<<CSW_MP5NAVY) | (1<<CSW_M249) | (1<<CSW_M3) | (1<<CSW_M4A1) | (1<<CSW_TMP) | (1<<CSW_G3SG1) | (1<<CSW_SG552) | (1<<CSW_AK47) | (1<<CSW_P90))
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
 
 //register_event().
}
 
public event()
{
 static Players[32], Num;
 static Player;
 get_players(Players, Num, "ach");
 
 for(new i = 0 ; i < Num ; i++)
 {
  Player = Players[i];
 
  static Weapons[32], WpnNum;
  get_user_weapons(Player, Weapons, WpnNum);
 
  for(new j = 0 ; j < WpnNum ; j++)
  {
   if(PRIMARY_WEAPONS & ( 1 << Weapons[j]))
   {
    static WpnName[32];
    get_weaponname(Weapons[j], WpnName, sizeof WpnName - 1);
 
    engclient_cmd(Player, WpnName);
   }
  }
 }
}
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 12-26-2007 at 05:18.
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:00.


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