Hi all,
Attached is a weapon plugin called "Gatling".. and under the plugin init section you will find the register_clcmd line that I've edited to make it console only & for admins only..
only problems is.. everyone can still use it and NOT only admins.. can someone me help out and make the console command to buy for ADMINS ONLY?!
Code:
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
register_forward(FM_CmdStart, "fw_CmdStart")
register_forward(FM_SetModel, "fw_SetModel")
register_forward(FM_UpdateClientData, "fw_UpdateClientData_Post", 1)
register_forward(FM_PlaybackEvent, "fw_PlaybackEvent")
RegisterHam(Ham_TraceAttack, "worldspawn", "fw_TraceAttack")
RegisterHam(Ham_TraceAttack, "player", "fw_TraceAttack")
RegisterHam(Ham_Item_Deploy, weapon_gatling, "fw_Item_Deploy_Post", 1)
RegisterHam(Ham_Weapon_Reload, weapon_gatling, "fw_Weapon_Reload_Post", 1)
RegisterHam(Ham_Item_PostFrame, weapon_gatling, "fw_Item_PostFrame")
RegisterHam(Ham_Item_AddToPlayer, weapon_gatling, "fw_Item_AddToPlayer_Post", 1)
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_gatling, "fw_Weapon_PrimaryAttack")
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_gatling, "fw_Weapon_PrimaryAttack_Post", 1)
register_clcmd("weapon_gatling", "hook_weapon")
register_clcmd("get_gatling", "get_gatling", ADMIN_BAN)
}