DarkRP.Player.GrantPriv

From Official DarkRP Wiki
Jump to navigation Jump to search
This page refers to DarkRP 2.4.3. This information may be incorrect as of later versions.
Check here for a up-to-date list of functions.
Function
Function name Player:GrantPriv(string priv)
Description:
Grants the player a privilege.
Returns: nil
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.GrantPriv]Player:GrantPriv[/url][/b]

Examples

DescriptionGive every player the toolgun privilege.
Used onNewerServer.png
Code
function GiveAllToolgunPriv )
	for k, v in pairs(player.GetAll()) do
   		v:GrantPriv("tool")
	end
end
OutputN/A


Additional Notes

  • Possible privileges are: admin, mayor, cp, tool, phys and prop
  • This function has been removed and has been replaced with FAdmin.