Raised This Month: $ Target: $400
 0% 

a wee bit o' help for the newbie


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-28-2005 , 20:52   a wee bit o' help for the newbie
Reply With Quote #1

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!
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-28-2005 , 21:05  
Reply With Quote #2

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.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-28-2005 , 21:54  
Reply With Quote #3

+lookup was an example
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-28-2005 , 22:31  
Reply With Quote #4

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 }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-28-2005 , 23:06  
Reply With Quote #5

v3x, you cannot register + and - commands with AMXx, unless they're you're own.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-28-2005 , 23:09  
Reply With Quote #6

Oh, right..
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-28-2005 , 23:32  
Reply With Quote #7

lol, how would i do it then?
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 03-01-2005 , 12:22  
Reply With Quote #8

anyone?
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-01-2005 , 12:24  
Reply With Quote #9

What is the REAL command you want blocked from users? (PM me if top-secret!)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-01-2005 , 16:12  
Reply With Quote #10

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)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 14:03.


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