10.03.2018, 14:11
Hi, I have problem with MySQL BlueG r-41, I have command with query:
And enum with data player
{
....
Admin
}
When Player is in game data are loaded and level admin is correct, but when I change this level I always must leave the game, to data has been re-loaded. How refresh data player in game ? (This is version MySQL with cache)
sorry for my english, I'm polish.
PHP код:
CMD:giveadmin(playerid, params[])
{
new query[500];
mysql_format(DB, query, sizeof(query), "UPDATE `test` SET `Admin`='%s' WHERE `Nick`='%s'", params, GetPlayerNick(playerid));
mysql_query(DB, query);
return 1;
}
{
....
Admin
}
PHP код:
forward OnAccountLoad(playerid); <-- When player is logging
public OnAccountLoad(playerid)
{
...
cache_get_value_int(0, "Admin", Player[playerid][Admin]);
}
sorry for my english, I'm polish.