AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   a wee bit o' help for the newbie (https://forums.alliedmods.net/showthread.php?t=10782)

Sp4rt4n 02-28-2005 20:52

a wee bit o' help for the newbie
 
erm.. everytime someone does a console command, like '+lookup' or something, i want to check if hes an admin, and if not, i want him to not be able to use that command.. what would the code be for that?

ive tried to figure it out, but i just cant...

NEWB SCRIPTER COMIN THROUGH!

TotalNoobScripter 02-28-2005 21:05

admins can only look up! now thats an idea.. lol

well i would imagine that tou would hook +lookup with registering a register_clcmd and then go from there.

Sp4rt4n 02-28-2005 21:54

:P +lookup was an example

v3x 02-28-2005 22:31

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #define PLUGIN    "Block Commands" #define AUTHOR    "John Doe" #define VERSION    "1.00" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("+lookdown","blockCmd",ADMIN_SLAY,"- Look down")     register_clcmd("+lookup","blockCmd",ADMIN_SLAY,"- Look up") } public blockCmd(id,level,cid) {     if(!cmd_access(id,level,cid,2))     {         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }

XxAvalanchexX 02-28-2005 23:06

v3x, you cannot register + and - commands with AMXx, unless they're you're own.

v3x 02-28-2005 23:09

Oh, right.. :roll:

Sp4rt4n 02-28-2005 23:32

lol, how would i do it then?

Sp4rt4n 03-01-2005 12:22

anyone?

v3x 03-01-2005 12:24

What is the REAL command you want blocked from users? (PM me if top-secret!)

Twilight Suzuka 03-01-2005 16:12

If the command is strictly client, and not sent to the server except through messages, you will not be able to block it this way.

If you told me what it was, I could figure out if you could lock it another way. (or common sense could let others figure it out)


All times are GMT -4. The time now is 14:03.

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