Would it be possible to make some type of Admin Blacklist?

Users who are viewing this thread

I want to have a thing that makes it so that if someone has a unique id or steamid or some type of id, i can add it to a list that makes it so even if they enter the admin password, it does not work.

This will also work as a white list. By that i mean no admin password. It would go by some type of unique id
 
You can use something like this:
Code:
(player_get_unique_id, ":id", ":player_id"),
(try_begin),
     (this_or_next|eq, ":id", 123456), # an id that has been blacklisted
     (eq, ":id", 7890123), # another id that has been blacklisted
     
     (player_set_is_admin, ":player_id", 0),
(try_end),

Or as a whitelist:
Code:
(player_get_unique_id, ":id", ":player_id"),
(try_begin),
     (neq, ":id", 123456), # an id that has been whitelisted
     (neq, ":id", 7890123), # another id that has been whitelisted
     
     (player_set_is_admin, ":player_id", 0),
(try_end),
 
Caesim said:
You can use something like this:
Code:
(player_get_unique_id, ":id", ":player_id"),
(try_begin),
     (this_or_next|eq, ":id", 123456), # an id that has been blacklisted
     (eq, ":id", 7890123), # another id that has been blacklisted
     
     (player_set_is_admin, ":player_id", 0),
(try_end),

Or as a whitelist:
Code:
(player_get_unique_id, ":id", ":player_id"),
(try_begin),
     (this_or_next|neq, ":id", 123456), # an id that has been whitelisted
     (neq, ":id", 7890123), # another id that has been whitelisted
     
     (player_set_is_admin, ":player_id", 0),
(try_end),

ill try it. Where should i put it? In a separate .txt file or in a .py file?
 
Caesim said:
Or as a whitelist:
Code:
(player_get_unique_id, ":id", ":player_id"),
(try_begin),
     (this_or_next|neq, ":id", 123456), # an id that has been whitelisted
     (neq, ":id", 7890123), # another id that has been whitelisted
     
     (player_set_is_admin, ":player_id", 0),
(try_end),
remove the this_or_next for the whitelist, else every id will return true (it would only return false if it was both id1 and id2 and that's impossible)
 
Caesim said:
I seriously recommend you learn the basics of the module system before asking any more questions. It ain't that hard.

It's not hard for you..
 
you can check the dedicated server log to check the unique ID of players, then just add more lines with (neq, ":id", <ID>), changing the <ID> with the admin's Uid
 
Back
Top Bottom