08.05.2018, 09:29
PHP код:
public OnPlayerConnect(playerid)
{
ClanInvited[playerid] = 999;
ClanInvitedBy[playerid] = 999;
new string[128];
gIncorrectPW[playerid] = 0;
gLogged[playerid] = 0;
format(string, sizeof(string), "%s (%d) has connected to the server. [%d/%d]", GetPlayerNameEx(playerid), playerid, Iter_Count(Player), MAX_PLAYERS);
SendClientMessageToAll(COLOR_DONOR, string);
SetPlayerCameraPos(playerid, 1058.593872, 1020.997863, 57.898475);
SetPlayerCameraLookAt(playerid, 1055.358764, 1017.354858, 56.774765);
XPtxtdraw[playerid] = CreatePlayerTextDraw(playerid, 504.000000, 80.640007, "$0000000");
PlayerTextDrawLetterSize(playerid, XPtxtdraw[playerid], 0.645200, 1.988266);
PlayerTextDrawAlignment(playerid, XPtxtdraw[playerid], 1);
PlayerTextDrawColor(playerid, XPtxtdraw[playerid], -5963521);
PlayerTextDrawSetShadow(playerid, XPtxtdraw[playerid], 0);
PlayerTextDrawSetOutline(playerid, XPtxtdraw[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, XPtxtdraw[playerid], 255);
PlayerTextDrawFont(playerid, XPtxtdraw[playerid], 3);
PlayerTextDrawSetProportional(playerid, XPtxtdraw[playerid], 1);
if(fexist(UserPath(playerid)))
{
//INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
format(string, sizeof(string), "Welcome back %s, please input your password below to login.", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login!",string,"Login","Quit");
}
else
{
format(string, sizeof(string), "Welcome %s to our server, please input your password below to register.", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Register!",string,"Register","Quit");
}
TextDrawShowForPlayer(playerid, Intro[0]);
TextDrawShowForPlayer(playerid, Intro[1]);
mk[playerid] = 0;
ck[playerid] = 0;
pk[playerid] = 0;
return 1;
}