Raised This Month: $ Target: $400
 0% 

Admin only command- Gatling weapon


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dare.Devil
Member
Join Date: May 2014
Old 08-30-2015 , 02:59   Admin only command- Gatling weapon
Reply With Quote #1

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)
}
Attached Files
File Type: sma Get Plugin or Get Source (gatling-test.sma - 673 views - 15.1 KB)
Dare.Devil 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 22:09.


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