AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Making Public Plugins Private (https://forums.alliedmods.net/showthread.php?t=28688)

ChoLo 05-20-2006 12:33

Making Public Plugins Private
 
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.

Janet Jackson 05-20-2006 12:41

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

ChoLo 05-20-2006 13:28

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?

Janet Jackson 05-20-2006 13:32

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")

ChoLo 05-20-2006 13:50

ok... but can i give other ppl the power? and i can't find those lines :(

ChoLo 05-20-2006 14:04

is htere an easier way to find the lines i need to fine? WHY CANT IT BE IN ALPHABETICAL ORDER!!!

allenwr 05-20-2006 14:19

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]") }

ChoLo 05-20-2006 14:34

2 Attachment(s)
ok here is the plugin.. can you plz tell me where that line is.. i can't find it anywhere..

allenwr 05-20-2006 15:04

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.

ChoLo 05-20-2006 15:29

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


All times are GMT -4. The time now is 16:19.

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