08.12.2013, 15:15
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:
This is placed under OnPlayerConnect.
Whoever helps me, thanks. I'll hand you a REP.
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);
}
}
Whoever helps me, thanks. I'll hand you a REP.


