Small connecting message bug.
#1

I want to add a special connecting message for our scripters, but I am having a problem.
My server crashes when I connect with iRonan, and this one has a special message. Also happens with a competely random name.

Code:
Код:
    new pName[MAX_PLAYER_NAME];
    for (new i = GetMaxPlayers(), j; j < i; i++)
    {
        GetPlayerName(i, pName, sizeof (pName));
        if (!strcmp(pName, "iRonan", true))
        {
			SendClientMessage(playerid, COLOR_GREY, "{00FFFF}iRonan{FFFFFF} has connected: IG-DM Developer");
        }
        if (!strcmp(pName, "Mabee", true))
        {
            SendClientMessage(playerid, COLOR_GREY, "{00FFFF}Mabee{FFFFFF} has connected: IG-DM Developer");
		}
        if (!strcmp(pName, "lag.cs", true))
        {
            SendClientMessage(playerid, COLOR_GREY, "{00FFFF}Lag.cs{FFFFFF} has connected: IG-DM Tester");
		}
        if (!strcmp(pName, "chazrp", true))
        {
            SendClientMessage(playerid, COLOR_GREY, "{00FFFF}Chazrp{FFFFFF} has connected: IG-DM Tester");
		}
        else
        {
			    new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
			    GetPlayerName(playerid, name, sizeof(name));
	            format(string, sizeof(string), "{00FFFF}%s{FFFFFF} has joined.", name);
    			SendClientMessageToAll(COLOR_GREY, string);
        }
    }
This is placed under OnPlayerConnect.

Whoever helps me, thanks. I'll hand you a REP.
Reply


Messages In This Thread
Small connecting message bug. - by [WA]iRonan - 08.12.2013, 15:15
Re: Small connecting message bug. - by David (Sabljak) - 08.12.2013, 15:19
Re: Small connecting message bug. - by [WA]iRonan - 08.12.2013, 15:28
Re: Small connecting message bug. - by Wizzy951 - 08.12.2013, 15:29
Re: Small connecting message bug. - by [WA]iRonan - 08.12.2013, 15:34
Re: Small connecting message bug. - by David (Sabljak) - 08.12.2013, 15:48
Re: Small connecting message bug. - by [WA]iRonan - 08.12.2013, 15:50

Forum Jump:


Users browsing this thread: 1 Guest(s)