4220niller
XHTML / CSS Coder
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
the red part needs to be changed to your groups access
GROUP_ACCESS = {GROUP1 ACCESS, GROUP2 ACCESS, GROUP3 ACCESS, ...}
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
GROUP_ACCESS = {GROUP1 ACCESS, GROUP2 ACCESS, GROUP3 ACCESS, ...}