Admin Counting [HELP FAST PLEASE]
Code:
/* Plugin generated by AMXX-Studio */This plugin should be a plugin who counts the admins online when a player connects. Well, I used the code from /admin command for this one. When a player connects, the code it's counting the admins online, if there is an admin online the plugin will automatically set him to bz, otherwise he will keep the admin access (if he is admin). What I'm wanting to do is, a plugin when an admin is connecting, if there is an admin online his admin won't be available, his access will be set to "bz", otherwise, if isn't any admin online he will keep his access. I really need help, I don't know what's wrong!? |
Re: Admin Counting [HELP FAST PLEASE]
Quote:
Code:
public client_authorized(id) { |
Re: Admin Counting [HELP FAST PLEASE]
Still not working....when 2 admins come online they both have access.
Well, what I want to make is. How could I make a code that when an user connects on the server, the server will check if there are 1 or more admins, if there are, the user connected will have acces bz. I know how to make to set the acces, but I don't know how to make the count. Help me please. Something like: Code:
public onclientconnect(id) { |
Re: Admin Counting [HELP FAST PLEASE]
try this:
Code:
|
Re: Admin Counting [HELP FAST PLEASE]
Quote:
|
Re: Admin Counting [HELP FAST PLEASE]
Make sure you have a global var maxplayers and set its value to get_maxplayers() in plugin init. Also, no need for the new_flags variable, put read_flags directly in set_user_flags..or just use ( ADMIN_BAN | ADMIN_USER ) (assuming flag b is ADMIN_BAN and z is ADMIN_USER). Be sure to call remove_user_flags prior to setting flags since set_user_flags is actually add_user_flags.
remove_user_flags( id ); set_user_flags( id , ADMIN_BAN | ADMIN_USER ); |
Re: Admin Counting [HELP FAST PLEASE]
Quote:
|
Re: Admin Counting [HELP FAST PLEASE]
Take a look at my Admin Hierarchy plugin, it does similar to what you are requesting.
Try this: PHP Code:
|
Re: Admin Counting [HELP FAST PLEASE]
UP! Doesn't work. Any other solutions? I can't find the missing key to work. Please? :mrgreen:
|
| All times are GMT -4. The time now is 11:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.