Scripting Help
#1

I have a problem with JunkBuster 11.

How to declare if the player has an Admin Level ?(not just RCON Admin)

I'm using Zombie Apocalypse Afterlife by FahadKing07


Please help
Reply
#2

Код:
CMD:setpro(playerid,params[])
{
	if(pInfo[playerid][pLogged] == 1)
	{
		if(pInfo[playerid][pAdminLevel] >= 8)
		{
			new targetid,level,string[256];
			if(sscanf(params, "ud", targetid, level)) return  SendClientMessage(playerid,-1,""chat" /setpro [playerid] [level]");
			if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
			if(level < 0 || level > 10) return SendClientMessage(playerid,-1,""chat"  Admin levels are ONLY between 1-10");

			pInfo[targetid][pAdminLevel] = level;

			format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s have given admin status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid));
			SendClientMessageToAll(-1,string);
			printf("%s %s have given admin status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid));
		}
		else {
			SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
		}
	}
    else if(pInfo[playerid][pLogged] == 0)
	{
		SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!");
		printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid));
		Kick(playerid);
	}
	return 1;
}
This command is how an admin, adds another.

Код:
if(pInfo[playerid][pAdminLevel] >= 8)
Change that to this...

Код:
if(pInfo[playerid][pAdminLevel] >= 8||IsPlayerAdmin(playerid))
You'll then be able to promote people via that command. (Once the userfile is saved and an admin is set you could remove the addition from the command)


Other than that, you have to edit the userfile, whilst someone is offline, and change the pAdminLevel user ini.
Reply
#3

Yeah, I know about that setpro command.

JunkBuster only consider a player as admin IF he/she logged in as RCON.

My problem is,
how could JunkBuster will consider a player as admin IF he/she has a "pInfo[playerid][pAdminLevel] >= 1" but not RCON Admin ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)