Player/SetUserGroup

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Func |Name=SetUserGroup |Parent=Player |Description=Sets the usergroup of the player. |Realm=Server |IsClass=Yes }} {{Arg |type=string |name=groupName |desc=The use...")
 
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=SetUserGroup
 
|Parent=Player
 
 
|Description=Sets the usergroup of the player.
 
|Description=Sets the usergroup of the player.
 
|Realm=Server
 
|Realm=Server
Line 10: Line 8:
 
|name=groupName
 
|name=groupName
 
|desc=The user group of the player.
 
|desc=The user group of the player.
 +
}}
 +
{{Example
 +
|Description=Will make the user superadmin
 +
|Code=Entity(1):SetUserGroup("superadmin")
 +
print(Entity(1):GetUserGroup())
 +
|Output=superadmin
 
}}
 
}}

Revision as of 03:59, 14 December 2016

 Player:SetUserGroup( )

Contents

Description

Sets the usergroup of the player.

Arguments

string groupName

The user group of the player.

Examples

Example

Will make the user superadmin

Entity(1):SetUserGroup("superadmin")
print(Entity(1):GetUserGroup())

Output:

superadmin
Personal tools
Navigation