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;
}
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_row(0, 8, temp);
printf("thefatshizms admin level is %d", temp);
cache_get_row(0, 3, temp);
printf("thefatshizms money is %d", temp);
}
return 1;
}
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], temp2; cache_get_field_content(0, "admin", temp); temp2 = strval(temp); printf("thefatshizms admin level is %d", temp2); cache_get_field_content(0, "money", temp); temp2 = strval(temp); printf("thefatshizms money is %d", temp2); } return 1; }
Код:
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], temp2; cache_get_field_content(0, "admin", temp); temp2 = strval(temp); printf("thefatshizms admin level is %d", temp2); cache_get_field_content(0, "money", temp); temp2 = strval(temp); printf("thefatshizms money is %d", temp2); } return 1; } |