Set myself admin on my own server
#1

Hey, finally got my server to run but can't set myself an admin, even if I log into rcon. There are no userfiles getting saved and I can't find them in my mysql database aswell, it's all poorly set up with the mysql database and I'm just looking forward to furnish a little on that RP server.

Could someone make this command public for me? Like, anyone can type it and make someone/himself an admin.

Код:
COMMAND:makeadmin(playerid, params[])
{
	if(GetPVarInt(playerid, "Admin") < 9) return nal(playerid);
	new id, lvl, str[128];
	if(sscanf(params, "ud", id, lvl)) return usage(playerid, "/makeadmin [Player] [Level]");
	if(GetPVarInt(playerid, "Admin") < GetPVarInt(id, "Admin")) return nal(playerid);
	if(GetPVarInt(playerid, "Admin") < lvl) return nal(playerid);
	if(lvl < 0 || lvl > 10) return error(playerid, "Invalid admin lvl.");
	SetPVarInt(id, "Admin", lvl);
	format(str, sizeof(str), "You have set (%s) to admin level (%d).", PlayerName(id), lvl);
	SCM(playerid, -1, str);
	return 1;
}
Reply


Messages In This Thread
Set myself admin on my own server - by xIs0BiHx - 05.08.2016, 20:36
Re: Set myself admin on my own server - by Stinged - 05.08.2016, 20:41
Re: Set myself admin on my own server - by xIs0BiHx - 05.08.2016, 20:46
Re: Set myself admin on my own server - by JustMe.77 - 05.08.2016, 20:49
Re: Set myself admin on my own server - by xIs0BiHx - 05.08.2016, 20:58
Re: Set myself admin on my own server - by xIs0BiHx - 05.08.2016, 21:00
Re: Set myself admin on my own server - by xIs0BiHx - 05.08.2016, 21:34
Re: Set myself admin on my own server - by Shinja - 05.08.2016, 21:38
Re: Set myself admin on my own server - by xIs0BiHx - 05.08.2016, 21:40
Re: Set myself admin on my own server - by Stinged - 05.08.2016, 22:04

Forum Jump:


Users browsing this thread: 3 Guest(s)