This script is to give admins an awp with full bullets and take away any primary weapons, I was wondering if someone could edit this to make it so you can only use this command once per round? Also I have this same script for the M4 & AK I was wondering if its better to use 3 different scripts or merge them all together?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta>
#define PLUGIN "Test"
#define AUTHOR "Jim"
#define VERSION "1.0"
#define ACCESS_FLAG ADMIN_VOTE
new const pri[18] =
{
CSW_AK47,
CSW_AUG,
CSW_AWP,
CSW_FAMAS,
CSW_G3SG1,
CSW_GALI,
CSW_M249,
CSW_M3,
CSW_M4A1,
CSW_MAC10,
CSW_MP5NAVY,
CSW_P90,
CSW_SCOUT,
CSW_SG550,
CSW_SG552,
CSW_TMP,
CSW_UMP45,
CSW_XM1014
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_awpme", "give_awp", ACCESS_FLAG, "give an awp")
}
public give_awp(id, lvl, cid)
{
if(!cmd_access(id, lvl, cid, 1))
return PLUGIN_HANDLED
if(is_user_alive(id))
{
new weapons = pev(id, pev_weapons) & ~(1<<31)
for(new i; i < 18; ++i)
{
if(weapons & (1<<pri[i]))
{
new wpname[20]
get_weaponname(pri[i], wpname, 19)
engclient_cmd(id, "drop", wpname)
break
}
}
give_item(id, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 30)
}
return PLUGIN_HANDLED
}
__________________