messages related to joining/leaving/dm chating shows the admin ranks, but doesn't show the RCON one.
#9

When you say it doesn't do anything? Which bit? The OnPlayerConnect, won't work as someone already stated above, because you have to login as rcon after you've connected.

Code:
	if(PlayerInfo[playerid][AdminLevel] > 0)
	{
		if(IsPlayerAdmin(playerid))
		{
			admrank = "{FF0000}[RCON Admin]";
		}
		else
		{
			switch(PlayerInfo[playerid][AdminLevel])
			{
				case 1: admrank = "{FFFF00}[Moderator]";
				case 2: admrank = "{008000}[Administrator]";
				case 3: admrank = "{3366FF}[Manager]";
			}
		}
		format(string, sizeof(string), "{A9A9A9}[{00FF00}+{A9A9A9}]{00FF00} %s {FFFFFF}%s (%d) {00FF00}has joined the server!", admrank, pname, playerid);
		SendClientMessageToAll(COLOR_LIME, string);
	}
	else
	{
		format(string, sizeof(string), "{A9A9A9}[{00FF00}+{A9A9A9}]{FFFFFF} %s (%d) {00FF00}has joined the server!", pname, playerid);
		SendClientMessageToAll(COLOR_LIME, string);
	}
	else
	{
		format(string, sizeof(string), "{FFFFFF}Welcome, the account \"{FF0000}%s{FFFFFF}\" is not registered.\nIn order to play, you must register by typing a password below.", pname);
		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FF0000}Registration", string, "Okay", "Quit");
		format(string, sizeof(string), "{A9A9A9}[{00FF00}+{A9A9A9}]{00FF00} \"{FFFFFF}%s{00FF00}\" (%d) has joined the server for the first time!", pname, playerid);
	}
    return 1;
}
Code:
	if(IsPlayerAdmin(playerid))
    {
        format(string, sizeof(string), "[RCON] {FFFFFF}%s(%d): %s", pname, playerid, text);
        SendClientMessageToAll(COLOR_RCON, string);
        return 0;
    }
    else if(PlayerInfo[playerid][AdminLevel] < 1)
    {
        format(string, sizeof(string), "%s(%d): %s", pname, playerid, text);
        SendClientMessageToAll(COLOR_WHITE, string);
        return 0;
    }
    else if(PlayerInfo[playerid][AdminLevel] == 1)
    {
        format(string, sizeof(string), "[Moderator] {FFFFFF}%s(%d): %s", pname, playerid, text);
        SendClientMessageToAll(COLOR_YELLOW, string);
        return 0;
    }
    else if(PlayerInfo[playerid][AdminLevel] == 2)
    {
        format(string, sizeof(string), "[Administrator] {FFFFFF}%s(%d): %s", pname, playerid, text);
        SendClientMessageToAll(COLOR_ADMINISTRATOR, string);
        return 0;
    }
    else if(PlayerInfo[playerid][AdminLevel] == 3)
    {
        format(string, sizeof(string), "[Manager] {FFFFFF}%s(%d): %s", pname, playerid, text);
        SendClientMessageToAll(COLOR_MANAGER, string);
        return 0;
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)