Here you can find list of functions and Information about them.
|Server MRS.SetPlayerRank( Player ply, string group, number id, boolean silent )|
Sets rank for a player in a given group by rankid. This function will automatically check for group and rank validation.
- Player ply | A player to set the rank for
- string group | The group id, in which you want to set the rank
- number id | The rank id, which you want to set
- boolean silent | Suppress the notification. If set to true, player will not get notification about promotion/demotion
Promote player by one rank in group "LAPD" (change + 1 to - 1 for demotion):
local rank = MRS.GetPlyRank(ply, "LAPD") MRS.SetPlayerRank(ply, "LAPD", rank + 1)
|Shared MRS.GetNWdata( Player ply, string key )|
Returns networked data related to the MRS. Can be a string or a number. Primarely uses to get player's current group and rank id.
- Player ply | The player who is associated with the value
- string key | The key that is associated with the value
Get players group and rank ids:
local group = MRS.GetNWdata(ply, "Group") local rank = MRS.GetNWdata(ply, "Rank")
Returns active rank info for a player:
local group = MRS.GetNWdata(ply, "Group") local rank = MRS.GetNWdata(ply, "Rank") if not MRS.Ranks[group] or not MRS.Ranks[group].ranks[rank] then return false end local rank_info = MRS.Ranks[group].ranks[rank]
|Shared MRS.GetPlyRank( Player ply, string group)|
Returns the rank id for a player in the mentioned group, even if he is not currently playing in that group.
- number | Rank ID