10.02.2013, 13:26
Hello, I'm trying to convert to mysql r7 with cache functions but for some reason it's saying my money and admin 52 when actually my money is 0 and my admin is 4
pawn Код:
public OnPlayerConnect(playerid)
{
mysql_function_query(Gconnection, "SELECT * FROM users WHERE `username`='thefatshizms'", true, "OnPlayerLogin", "d", "playerid");
return 1;
}
forward OnPlayerLogin(playerid);
public OnPlayerLogin(playerid) {
new rows, fields;
cache_get_data(rows, fields, Gconnection);
if(rows)
{
new temp[12];
cache_get_field_content(0, "admin", temp);
printf("thefatshizms admin level is %d", temp);
cache_get_field_content(0, "money", temp);
printf("thefatshizms money is %d", temp);
}
return 1;
}