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?