Insert mappings + Share info between filterscripts/gm
#1

First of all, I know that both of the issues mentioned in the title might have been explained earlier in the SA:MP forums but while searching for hours I haven't found a satisfying answer.

1st question. How can I add mappings to my server and load them without restarting the server?

2nd question. I am using LuxAdmin and there is this line:

pawn Код:
if(AccInfo[playerid][Level] > 5)
I need to use this in my gamemode or another filterscript to force the server to check someone's account level and I have heard something about Pvar. I am confused with this and I have no idea how to use it. Please give me instructions about this.

Thanks in advance.
Reply
#2

In LuxAdmin login as "admin" write:

Код:
SetPVarInt(playerid,"Level",PlayerInfo[playerid][Level]);
Anywhere in your gamemode:

Код:
stock IsAdmin(playerid,rang)
{
	if(GetPVarInt(playerid,"Level")>=rang)return 1;
	return 0;
}
In your command,etc..

Код:
if(!IsAdmin(playerid,2))return 0;
if you aren't Admin level2 or higher, it returns 0.


After all,I suggest you to quit using LuxAdmin and make your own Admin system, it's easier than you think and use Y_ini not Dini.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)