I made mysql connection in my gamemode.
But when i login, server needs 2678 miliseconds for loading all variables at once.
That is too much for me, also i tested with Y_ini system which read fast those variables, and with him is not so.
I'm interested in your opinion
I'm using MYSQL R39 version
Sorry for my bad writting in English i hope you understand me.
But when i login, server needs 2678 miliseconds for loading all variables at once.
That is too much for me, also i tested with Y_ini system which read fast those variables, and with him is not so.
I'm interested in your opinion
I'm using MYSQL R39 version
PHP Code:
CONNECT
{
new query[100], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `Players` WHERE `Name` = '%e' LIMIT 1", playername);
mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
}
LOAD
{
forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0, "Level");
PlayerInfo[playerid][pPosX] = cache_get_field_content_float(0, "PosX");
PlayerInfo[playerid][pPosY] = cache_get_field_content_float(0, "PosY");
PlayerInfo[playerid][pPosZ] = cache_get_field_content_float(0, "PosZ");
PlayerInfo[playerid][pPosA] = cache_get_field_content_float(0, "PosA");
PlayerInfo[playerid][pHealth] = cache_get_field_content_float(0, "Health");
PlayerInfo[playerid][pArmor] = cache_get_field_content_float(0, "Armor");
.
.
.
.
.
200 Variables like those is here
return 1;
}
}