Player.IsSuperAdmin

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:IsSuperAdmin( )
Description:
Returns true if the player is a member of the group "superadmin"
Returns: Boolean
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.IsSuperAdmin]Player.IsSuperAdmin [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionChecks and reports the player's Admin Status.
Used onNewerServer.png
Code
 
function SuperAdminCheck(ply, cmd, args)
	if ply:IsSuperAdmin() then //Checks if the player is a super admin
		ply:ChatPrint("You are a Super Admin on this server!") // prints in the chat that he is an admin
	elseif ply:IsAdmin() then // Checks if the player is an admin
		ply:ChatPrint("You are an Admin on this server!") // prints in chat that he is an admin
	else
		ply:ChatPrint("You are a normal Player!") // prints in chat to normal players
	end
end
concommand.Add("SACheck", SuperAdminCheck)
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox