Raised This Month: $ Target: $400
 0% 

Command reservation?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 11-12-2005 , 19:22   Command reservation?
Reply With Quote #1

How would you set a command to work for only certain STEAMID(s)? Such as, STEAM_0:0:123456 - ability to use, "say /godmode".

- Any help, highly appreciated.
Unidentified is offline
wiggles
Member
Join Date: Aug 2005
Old 11-12-2005 , 20:48  
Reply With Quote #2

u need amxmodx on ur server and u use the users.ini in there to configure taht
wiggles is offline
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 11-12-2005 , 21:45  
Reply With Quote #3

Does this mean I can set a different access flag, and set the users access flag to, "flag" within a script?
Unidentified is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-12-2005 , 21:47  
Reply With Quote #4

Yeah

Code:
register_clcmd("say /godmode", "cmd_godmode", ADMIN_LEVEL_A, ": Gives godmode");
__________________
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
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 11-12-2005 , 22:04  
Reply With Quote #5

I mean as In, Instead of Admin_LEVEL_A; flag6226 or whatever.
Unidentified is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-12-2005 , 22:26  
Reply With Quote #6

http://www.amxmodx.org/funcwiki.php?...=1#const_admin
__________________
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
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 11-13-2005 , 11:01  
Reply With Quote #7

If you want specified non-admins to have access, then make a seperate file that the plugin checks for access.
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-13-2005 , 13:07   Re: Command reservation?
Reply With Quote #8

Quote:
Originally Posted by Unidentified
How would you set a command to work for only certain STEAMID(s)? Such as, STEAM_0:0:123456 - ability to use, "say /godmode".
Code:
new steamids[3][] {     "STEAM_0:0:123456",     "STEAM_0:0:123456",     "STEAM_0:0:123456"  }  public check_authid(id) {     new authid[32], i;     get_user_authid(id,authid,31);     for(i=0;i<count(steamids);i++) {        if(equali(authid,steamids[i])) return 1;     }     return 0;  }  public myFunction(id) {     if(!check_authid(id)) {        client_print(id,print_chat,"* You have no access to this command");        return PLUGIN_HANDLED;     }     // your stuff here     return PLUGIN_HANDLED;  }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Unidentified
Senior Member
Join Date: Aug 2005
Location: Compton, L.A. Thug
Old 11-13-2005 , 17:35   Re: Command reservation?
Reply With Quote #9

Quote:
Originally Posted by XxAvalanchexX
Quote:
Originally Posted by Unidentified
How would you set a command to work for only certain STEAMID(s)? Such as, STEAM_0:0:123456 - ability to use, "say /godmode".
Code:
new steamids[3][] {     "STEAM_0:0:123456",     "STEAM_0:0:123456",     "STEAM_0:0:123456"  }  public check_authid(id) {     new authid[32], i;     get_user_authid(id,authid,31);     for(i=0;i<count(steamids);i++) {        if(equali(authid,steamids[i])) return 1;     }     return 0;  }  public myFunction(id) {     if(!check_authid(id)) {        client_print(id,print_chat,"* You have no access to this command");        return PLUGIN_HANDLED;     }     // your stuff here     return PLUGIN_HANDLED;  }
Two questions:

When I set the godmode flag to ADMIN_LEVEL_H a non-admin was able to use the command without authorization. WTF?

Avalanche: What about the clcmd or concmd part? Wouldn't that conflict?
Unidentified is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-13-2005 , 18:21   Re: Command reservation?
Reply With Quote #10

Quote:
Originally Posted by Unidentified
When I set the godmode flag to ADMIN_LEVEL_H a non-admin was able to use the command without authorization. WTF?
Did you use cmd_access to check for access, or just assume it would be done automatically?

Quote:
Originally Posted by Unidentified
What about the clcmd or concmd part? Wouldn't that conflict?
What about it? Just register it as a regular clcmd without any access levels, because once the function is called it checks to see if you have a valid steam id.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 23:39.


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