09.06.2014, 11:32
pawn Код:
inline LoadPlayerStats(pid)
{
#pragma unused pid
if(cache_get_row_count(sVar::[SQL_Connection]) > 0)
{
print("something");
new Float:zPos[3];
pVar::playerid[Pinigai] = cache_get_field_content_int(0, "Pinigai");
SetScore::playerid(cache_get_field_content_int(0, "Patirtis"));
pVar::playerid[Lytis] = cache_get_field_content_int(0, "Lytis");
zPos[0] = cache_get_field_content_float(0, "xPos");
zPos[1] = cache_get_field_content_float(0, "yPos");
zPos[2] = cache_get_field_content_float(0, "zPos");
SetPos::playerid(zPos[0], zPos[1], zPos[2]);
pVar::playerid[Reputacija] = cache_get_field_content_int(0, "Reputacija");
cache_get_field_content(0, "EPastas", pVar::playerid[EPastas], sVar::[SQL_Connection], 50);
}
}
new query[72];
mysql_format(sVar::[SQL_Connection], szf[query], "SELECT * FROM `vartotojai` WHERE `Vardas`='%s'", zVardas(playerid));
mysql_pquery(sVar::[SQL_Connection], query, using inline "LoadPlayerStats", "d", playerid);