AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Counting admins on server (https://forums.alliedmods.net/showthread.php?t=143535)

reinert 11-21-2010 08:00

Counting admins on server
 
PHP Code:

/* Plugin generated by AMXX-Studio */

Why the hell player's can open teamMENU() even if there is a admin with "m" flag on server... Where is the problem ??

EDIT: THANKS

SpeeDeeR 11-21-2010 10:05

Re: Counting admins on server
 
Because if "adminai" is below 1 the if is true and the check flags part is passed (because its optional) and executes the menu.

reinert 11-21-2010 10:35

Re: Counting admins on server
 
Yeh, that's what I wanted... If there is below than 1 (that means 0) admins on server, anyone can get teamMENU(); If more than 0 then only only players with ADMIN_CFG access...

Exolent[jNr] 11-21-2010 12:23

Re: Counting admins on server
 
Code:
get_players(Players, playerCount, "b")
http://www.amxmodx.org/funcwiki.php?go=func&id=174
Quote:

If specified, you can constrain which players are returned by flags:
"a" - Don't return dead players
"b" - Don't return alive players
"c" - Skip bots
"d" - Skip real players
"e" - Match with passed team
"f" - Match with part of name
"g" - Ignore case sensitivity
"h" - Skip HLTV
You are getting only dead players.
There can be alive admins in the server and the plugin wouldn't know it.
Remove the flags from the function.


All times are GMT -4. The time now is 11:17.

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