DarkRP.Player.HasPriv
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:HasPriv(string priv) |
Description: | |
Returns true or false depending on if the player has the privilige. | |
Returns: | boolean |
Part of Library: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.HasPriv]Player:HasPriv[/url][/b] |
Examples[edit]
Description | If the player is an admin, give player the cookie item/swep (non-existent) |
---|---|
Used on | |
Code | function DoIGetACookie( ply )
if ply:HasPriv("admin") then
ply:Give("cookie")
else
ply:Kill()
end
end
|
Output | N/A |
Additional Notes[edit]
- Possible privilages are: admin, mayor, cp, tool, phys and prop.