• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[function] getAccessOfPlayer(cid)

4220niller

XHTML / CSS Coder
Joined
Jul 4, 2007
Messages
127
Reaction score
1
Location
Denmark, Korsør
well since in TFS getPlayerAccess(cid) does not provide you with your real access, i decided to make this, cuz its usefull for making scripts where only GM's and God's is allowed to use.

some of you may say that its easier jsut to use getPlayerGroupId(cid) but what if you have more groups and not all of them is supposed to use this.

anyway here it is:
Global.lua
Code:
[COLOR="Red"]GROUP_ACCESS = {0, 1, 5}[/COLOR]
function getAccessOfPlayer(cid)
	group = getPlayerGroupId(cid)
	return GROUP_ACCESS[group]
end
the red part needs to be changed to your groups access
GROUP_ACCESS = {GROUP1 ACCESS, GROUP2 ACCESS, GROUP3 ACCESS, ...}
 
Back
Top