Raised This Month: $ Target: $400
 0% 

Making Public Plugins Private


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ChoLo
Member
Join Date: Mar 2006
Old 05-20-2006 , 12:33   Making Public Plugins Private
Reply With Quote #1

Ok i recently downloaded the Sentry Guns Program, Missiles Launcher, Flame Thrower. all public plugins. ne 1 can use it. How do i change it to where only admins can use it or only admins can give the "power" to use it. Please help me i'd really appreciate it.
ChoLo is offline
Janet Jackson
Veteran Member
Join Date: Mar 2005
Location: far, far away from here
Old 05-20-2006 , 12:41  
Reply With Quote #2

Quote:
Originally Posted by ChoLo
How do i change it to where only admins can use it
Look for lines like this :
Code:
register_clcmd ("command", "function", 0, "description")
And change it into something like this
Code:
register_clcmd ("command", "function", ADMIN_KICK, "description")
More possible levels : http://www.amxmodx.org/funcwiki.php?...=1#const_admin
__________________
Janet Jackson is offline
ChoLo
Member
Join Date: Mar 2006
Old 05-20-2006 , 13:28  
Reply With Quote #3

wow. i can't find anything... is there anyway for me to post the .sma of the plugins and someone change it to like give them the power like... amx_sentry <name> <1/0> for example?
ChoLo is offline
Janet Jackson
Veteran Member
Join Date: Mar 2005
Location: far, far away from here
Old 05-20-2006 , 13:32  
Reply With Quote #4

From sentryguns.sma :
Code:
    register_clcmd("sentry_build", "createsentryhere", 0, "- build a sentry gun where you are")     register_clcmd("sentry_menu", "menumain", 0, "- displays Sentry gun menu")
To make the commands only available for admins only it would look like this :
Code:
    register_clcmd("sentry_build", "createsentryhere", ADMIN_KICK, "- build a sentry gun where you are")     register_clcmd("sentry_menu", "menumain", ADMIN_KICK, "- displays Sentry gun menu")
__________________
Janet Jackson is offline
ChoLo
Member
Join Date: Mar 2006
Old 05-20-2006 , 13:50  
Reply With Quote #5

ok... but can i give other ppl the power? and i can't find those lines
ChoLo is offline
ChoLo
Member
Join Date: Mar 2006
Old 05-20-2006 , 14:04  
Reply With Quote #6

is htere an easier way to find the lines i need to fine? WHY CANT IT BE IN ALPHABETICAL ORDER!!!
ChoLo is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 05-20-2006 , 14:19  
Reply With Quote #7

dude....
those lines are in the
Code:
public plugin_init()  //located at top of plugin most of the time... {     register_plugin("plugin", "version", "Author")     register_concmd("command", ADMIN_KICK, "<name or #userid> [reason]") }
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
ChoLo
Member
Join Date: Mar 2006
Old 05-20-2006 , 14:34  
Reply With Quote #8

ok here is the plugin.. can you plz tell me where that line is.. i can't find it anywhere..
Attached Files
File Type: sma Get Plugin or Get Source (amx_ejl_missiles.sma - 635 views - 82.9 KB)
File Type: sma Get Plugin or Get Source (sentryguns.sma - 672 views - 114.3 KB)
ChoLo is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 05-20-2006 , 15:04  
Reply With Quote #9

ejl missiles :: lines 357 - 447
sentry :: lines 3073 - 3148

too much for me to do, but thats where the stuff i think you want is at.
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
ChoLo
Member
Join Date: Mar 2006
Old 05-20-2006 , 15:29  
Reply With Quote #10

holy shit... how do you find out which line is which?
ChoLo is offline
Reply



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 16:19.


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