/makeadmin command Help
#1

The problem is that the message is not appearing rite.
How can someone fix it where it shows the correct Value and Correct Name like it does in the first msg
Screen:
Код:
CMD:makeadmin(playerid, params[])
{
	new levels, adminname[MAX_PLAYER_NAME],playername[MAX_PLAYER_NAME],string[128],targetid;
	if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 6) return SCM(playerid, COLOR_RED, "You are not authorized to use this command");
	if(sscanf(params,"ui", targetid, levels)) return SCM(playerid, COLOR_FADE1, "CMD:makeadmin [Playerid] [Level]");
	if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_RED, "invalid player id");
	if(levels > 6) return SCM(playerid, COLOR_RED, "Levels Available 1-6");
	GetPlayerName(playerid,adminname, MAX_PLAYER_NAME);
	GetPlayerName(targetid,playername, MAX_PLAYER_NAME);
	if(levels == 0)
	{
	    format(string, sizeof(string), "%s have set your Admin level to %d.",adminname,levels);
	    SCM(targetid, COLOR_LIGHTBLUE,string);
	    format(string, sizeof(string), "You have set %s's Admin level to %d.",playername,levels);
	    SCM(playerid, COLOR_LIGHTBLUE,string);
	    PlayerInfo[targetid][pAdmin] = levels;
	    return 1;
 	}
 	format(string, sizeof(string), "%s have promoted you to Admin level to %d.",adminname, levels);
 	SCM(targetid, COLOR_LIGHTBLUE,string);
	format(string, sizeof(string), "You have promoted %'s Admin level to %d.",playername, levels);
	SCM(playerid, COLOR_LIGHTBLUE,string);
	PlayerInfo[targetid][pAdmin] = levels;
	return 1;
}
Reply


Messages In This Thread
/makeadmin command Help - by San1 - 12.06.2013, 05:30
Re: /makeadmin command Help - by San1 - 12.06.2013, 05:38
Re: /makeadmin command Help - by San1 - 12.06.2013, 05:40
Respuesta: /makeadmin command Help - by JustBored - 12.06.2013, 05:40

Forum Jump:


Users browsing this thread: 1 Guest(s)