23.12.2018, 16:56
I got this error when everytime i connected to my server, and it took a long time to Show my RLTD (Register Login TextDraw)
PHP код:
public OnPlayerConnect(playerid)
{
// REMOVE BUILDING
RemoveBuildingForPlayer(playerid, 4024, 1479.8672, -1790.3984, 56.0234, 0.25);
RemoveBuildingForPlayer(playerid, 4044, 1481.1875, -1785.0703, 22.3828, 0.25);
RemoveBuildingForPlayer(playerid, 4045, 1479.3359, -1802.2891, 12.5469, 0.25);
RemoveBuildingForPlayer(playerid, 1527, 1448.2344, -1755.8984, 14.5234, 0.25);
RemoveBuildingForPlayer(playerid, 3997, 1479.3359, -1802.2891, 12.5469, 0.25);
RemoveBuildingForPlayer(playerid, 4002, 1479.8672, -1790.3984, 56.0234, 0.25);
RemoveBuildingForPlayer(playerid, 3980, 1481.1875, -1785.0703, 22.3828, 0.25);
RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);
RemoveBuildingForPlayer(playerid, 713, 1407.1953, -1749.3125, 13.0938, 0.25);
RemoveBuildingForPlayer(playerid, 713, 1405.2344, -1821.1172, 13.1016, 0.25);
g_MysqlRaceCheck[playerid]++;
/* LUMBERJACK OPC */
LumberPlayer_Init(playerid);
/* HOUSE OPC */
House_PlayerInit(playerid);
/* BUSINESS OPC */
InBusiness[playerid] = INVALID_BUSINESS;
BizListPage[playerid] = 0;
/* ATM OPC */
CurrentAccountID[playerid] = -1;
LogListType[playerid] = TYPE_NONE;
LogListPage[playerid] = 0;
EditingATMID[playerid] = -1;
// reset player data
static const empty_player[PlayerInfo];
pInfo[playerid] = empty_player;
pInfo[playerid][Nick] = GetName(playerid);
if(TAdmin_Debug == true) printf("[%s - Debug]: Player %s (%d) from %s, %s with IP %s connected. - OnPlayerConnect", SYSTEMNAME, GetName(playerid), playerid, GetPlayerCity(playerid), GetPlayerCountry(playerid), returnIP(playerid));
ResetPlayerVariables(playerid);
// send a query to recieve all the stored player data from the table
new query[125];
mysql_format(g_SQL, query, sizeof query, "SELECT * FROM `players` WHERE `username` = '%e' LIMIT 1", GetName(playerid));
mysql_tquery(g_SQL, query, "ShowRLTD", "dd", playerid, g_MysqlRaceCheck[playerid]); // It took a long time to proccess this (maybe 3 secs)
mysql_format(g_SQL, query, sizeof(query), "SELECT * FROM `Vehicles` WHERE `vehOwner` = '%e'", GetName(playerid));
mysql_tquery(g_SQL, query, "LoadPlayerVehicles", "i", playerid);
mysql_format(g_SQL, query, sizeof(query), "SELECT * FROM `players` WHERE `username` = '%e';", GetName(playerid));
mysql_tquery(g_SQL, query, "CheckPlayer", "d", playerid); // Check if the player is banned
pInfo[playerid][pAdmin] = 0;
pInfo[playerid][pWarns] = 0;
pInfo[playerid][pMuted] = false;
pInfo[playerid][pMutedTime] = 0;
pInfo[playerid][pJailed] = false;
pInfo[playerid][pJailedTime] = 0;
pInfo[playerid][IsLoggedIn] = false;
CamTimer[playerid] = SetTimerEx("CinematicCam", 0, false, "d", playerid);
ManualVehicleEngineAndLights();
// MAPPING
return 1;
}