30.05.2015, 05:30
And what are you trying to do?
If you are trying to load all houses OnGameModeInit then this would do :
And if you are trying to load a particular house that belongs to a player online then this would do :
If you are trying to load all houses OnGameModeInit then this would do :
PHP код:
mysql_tquery(mysql, "SELECT * FROM `houses`", "OnLoadHouses", "");
PHP код:
new pname[MAX_PLAYER_NAME], query[100];
GetPlayerName(playerid, pname, sizeof(pname));//playerid = the player who's house is to be loaded
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `houses` WHERE `owner` = '%e'", pname);
mysql_tquery(mysql, query, "OnLoadHouses", "");