Player/SetUserGroup

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
Line 10: Line 10:
 
}}
 
}}
 
{{Example
 
{{Example
|Description=Will make the user superadmin
+
|Description=Will make the user superadmin and print his group.
 
|Code=Entity(1):SetUserGroup("superadmin")
 
|Code=Entity(1):SetUserGroup("superadmin")
 
print(Entity(1):GetUserGroup())
 
print(Entity(1):GetUserGroup())
 
|Output=superadmin
 
|Output=superadmin
 
}}
 
}}

Revision as of 18:31, 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 and print his group.

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

Output:

superadmin
Personal tools
Navigation