06.01.2018, 10:49
(
Последний раз редактировалось Kraeror; 07.01.2018 в 12:40.
)
Hello guys, I'm using the latest MySQL version, but when I load it, it works only for the callback, that I'm loading in it! Is it possible somethink like when I load at the start script it will be loaded for all commands, callbacks?
It is loading, I'm using it in the same callback, where it is loaded, but when I'm using it in command it is always "0".
The code (OnGameModeInit callback):
And there is my loading callback:
This result is printed CORRECT, but when I'm using this variable or another callback in command it prints "0"!
It is loading, I'm using it in the same callback, where it is loaded, but when I'm using it in command it is always "0".
The code (OnGameModeInit callback):
PHP код:
for(new h = 1; h < cache_num_rows(); h++)
{
mysql_format(zMySQL, query, sizeof(query), "SELECT * FROM `houses` WHERE `ID` = %d", h);
mysql_tquery(zMySQL, query, "LoadHouses", "i", h);
}
PHP код:
forward LoadHouses(houseid);
public LoadHouses(houseid)
{
new NumRows;
cache_get_row_count(NumRows);
if(numRows != 0)
{
for(new i = 0; i < NumRows; i++)
{
cache_get_value_name(i, "Position:X", HouseInfo[i][hX]);
printf("%f", HouseInfo[i][hX]);
}
}
return 1;
}