First, I apologize synthetic worries and spelling mistakes that may be ..
I have problems with my connection system, in fact it does not detect my callback, yet we seem to logs indicated good things.
Код:
public SafeOnPlayerConnect(playerid)
{
SetSpawnInfo(playerid, 0, 125, posArr{g_newbSpawn}, 0.0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
clearScreen(playerid, 30);
TogglePlayerControllable(playerid, 0);
SetPlayerCameraPos(playerid, 2339.18164, -2322.03564, 3.33340);
SetPlayerCameraLookAt(playerid, 2339.18164, -2322.03564, 3.33340);
new query[212];
mysql_format(DB, query, sizeof(query),"SELECT * FROM `rp_users` WHERE `username` = '%s' LIMIT 1", returnName(playerid));
mysql_tquery(DB, query, "OnAccountCheck", "i", playerid);
return 1;
}
public OnAccountCheck(playerid)
{
printf("teste");
new rows, fields;
cache_get_data(rows, fields, DB);
if(rows)
{
cache_get_field_content(0, "password", PlayerInfo[playerid][pPass], 256);
cache_get_field_content(0, "email", PlayerInfo[playerid][pEmail], 124);
PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "id");
new query[212];
mysql_format(DB, query, sizeof(query),"SELECT * FROM `players` WHERE `ID` = %d LIMIT 1", PlayerInfo[playerid][pID]);
mysql_tquery(DB, query, "OnPlayerDataLoad", "i", playerid);
}
return 1;
}
printf not unfortunately launches ...
[12:28:28] [DEBUG] mysql_format - connection: 1, len 212, format: "SELECT * FROM` WHERE `rp_users` username` = '% s'"
[12:28:28] [DEBUG] mysql_tquery - connection: 1 query: "SELECT * FROM` WHERE `rp_users` username` = 'Z3N0Nhh'" callback "OnAccountCheck", format: "i"