Err, sorry for bumping but the problem still exist even if i moved the message to account loading function. Can anyone help? :/
PHP код:
public OnPlayerConnect(playerid)
{
new
x1[E_PLAYERDATA],
x2[E_JOBDATA],
x3[E_SYNCDATA]
;
pInfo[playerid] = x1;
g_JobData[playerid] = x2;
g_SyncInfo[playerid] = x3;
g_SpecID[playerid] = INVALID_PLAYER_ID;
g_ReporterID[playerid] = INVALID_PLAYER_ID;
g_ReportedID[playerid] = INVALID_PLAYER_ID;
g_PlayerConvoyID[playerid] = 0;
g_PlayerInConvoy[playerid] = 0;
g_PrevPos[playerid][0] = 0.0;
g_PrevPos[playerid][1] = 0.0;
g_PrevPos[playerid][2] = 0.0;
g_PrevPos[playerid][3] = 0.0;
g_PrevSkin[playerid] = -1;
g_PrevClass[playerid] = 0;
g_MuteWarns[playerid] = 0;
g_LoginAttempts[playerid] = 0;
g_RconAttempts[playerid] = 0;
g_TargetDialog[playerid] = -1;
g_TargetDialogHouse[playerid] = -1;
g_RentVehicleDialog[playerid] = -1;
g_BuyVehicleDialog[playerid] = -1;
g_AdminWarned[playerid] = 0;
prev_Int[playerid] = -1;
prev_X[playerid] = 0.0;
prev_Y[playerid] = 0.0;
prev_Z[playerid] = 0.0;
g_TimerMute[playerid] = -1;
g_TimerJail[playerid] = -1;
g_TimerLoadUnload[playerid] = -1;
g_TimerSpeedo[playerid] = -1;
g_TimerRepairVeh[playerid] = -1;
g_TimerRefuelVeh[playerid] = -1;
g_TimerTicket[playerid] = -1;
g_TimerPullOver[playerid] = -1;
g_PlayerChatTime[playerid] = 0;
g_PlayerChatMsg[playerid] = "";
GetPlayerIp(playerid, pInfo[playerid][pIP], 16);
GetPlayerName(playerid, pInfo[playerid][pName], MAX_PLAYER_NAME);
new
string[64],
query[128]
;
format(string, sizeof(string), "Player %s has connected to the server.", pInfo[playerid][pName]);
SendClientMessageToAll(0xAAAAAAFF, string);
mysql_format(mysql, query, sizeof(query), "SELECT `nick`,`ip`,`expire` FROM `bans` WHERE `ip`='%e' OR `nick`='%e'", pInfo[playerid][pIP], pInfo[playerid][pName]);
mysql_tquery(mysql, query, "CheckBan", "i", playerid);
LoadTextDraws(playerid);
TogglePlayerSpectating(playerid, 1);
SetPVarInt(playerid, "money", 0);
SetPVarInt(playerid, "score", 0);
SetPVarInt(playerid, "firstspawn", 1);
pInfo[playerid][pText] = Create3DTextLabel("Connected", grey, 30.0, 40.0, 50.0, 40.0, 0, 1);
Attach3DTextLabelToPlayer(pInfo[playerid][pText], playerid, 0.0, 0.0, 0.5);
format(string, sizeof(string), "-- Hello and welcome back, %s", pInfo[playerid][pName]);
SendClientMessage(playerid, lightblue, string);
mysql_format(mysql, query, sizeof(query), "SELECT `pass`,`id` FROM `users` WHERE `nick`='%e' LIMIT 1", pInfo[playerid][pName]);
mysql_tquery(mysql, query, "QueryExecute", "ii", result_check_useraccount, playerid);
g_TimerSpeedo[playerid] = SetTimerEx("SpeedometerInit", 350, 1, "i", playerid);
return 1;
}