11.11.2015, 18:59
PHP код:
// above in defines
#define ClearChat(%0) for (new i = 0; i < 40; i++) SendClientMessage(%0, -1, " ")
public OnPlayerConnect(playerid)
{
ClearChat(playerid);
new string[SOS];
GetPlayerName(playerid, pInfo[playerid][Nick], 20);
GetPlayerIp(playerid, pInfo[playerid][Ip], 16);
format(string, SOS, "*** %s has joined the server.", pInfo[playerid][Nick]);
SendClientMessageToAll(ORANGE, string);
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password to register","Register","Quit");
}
return 1;
}