Making an Admin's list
#3

Quote:
Originally Posted by Mark_Samp
Посмотреть сообщение
Could you show the CMD that you used to set your admin level in the script first?
This is the command I used, it works fine and gives the other player the level specified. It's just the one command above to list the Admins that is bugging me... I just can't get it working.
Код:
cmd(agive, playerid, params[])
{
	// If player is not admin, returns value of 0
	if(GetPVarInt(playerid, "AdminLevel") == 0) return 0;

	// Makes sure player is admin before allowing promotion of another player
	if(GetPVarInt(playerid, "AdminLevel") == 1337)
	{
	    new ID; new string[120];
		if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /agive [ID]");
		if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_ERROR, "Unknown ID.");
		if(GetPVarInt(ID, "AdminLevel") == 1337) return SendClientMessage(playerid, COLOR_ERROR, "Error: That player is already an Administrator.");
		IRC_Say(gGroupID, IRC_CHANNEL, string);
		SendClientMessage(ID, COLOR_ADMIN, "You are now a member of the staff team.");
		SendClientMessage(ID, COLOR_ADMIN, "Do /adcmds for a list of your commands.");
		SetPVarInt(ID, "AdminLevel", 1337);
	}
	return 1;
}
The aforementioned command to get the players who are Admin allows for the script to compile as well so that has slumped me too.

Thanks for the reply by the way, I've been doing other things since I've been trying to get this working so I've not really played around with anything else.
Reply


Messages In This Thread
Making an Admin's list - by Skillzz - 27.04.2016, 11:50
Re: Making an Admin's list - by Mark_Samp - 27.04.2016, 12:27
Re: Making an Admin's list - by Skillzz - 27.04.2016, 15:29
Re: Making an Admin's list - by introzen - 27.04.2016, 15:46
Re: Making an Admin's list - by Ritzy2K - 27.04.2016, 15:50
Re: Making an Admin's list - by J0sh... - 27.04.2016, 15:54
Re: Making an Admin's list - by Lumanov - 27.04.2016, 16:13
Re: Making an Admin's list - by Skillzz - 27.04.2016, 16:36
Re: Making an Admin's list - by J0sh... - 27.04.2016, 17:00
Re: Making an Admin's list - by Skillzz - 27.04.2016, 17:06

Forum Jump:


Users browsing this thread: 1 Guest(s)