From BZFlagWiki
Revision as of 05:17, 19 October 2011 by Sigonasr2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

bool bz_hasPerm (int playerID, const char* perm)

Checks to see if the player specified has the permission specified.

playerID  -  The id of the player to check
perm  -  The name of the permission to check for
True if the player specified has the permission specified, false if they do not have the permission specified


Using a groups file, if you specify the +OPERATOR permission (You make it up) and then check for that permission upon a player join, you can as an example, set a player as the operator.

case bz_ePlayerJoinEvent: {
	if (bz_hasPerm(((bz_PlayerJoinPartEventData_V1*)eventData)->playerID,"OPERATOR")) {