29.05.2011, 15:34
I want to make a house pickup and then player enter on this pickup he gain the message with player name who own this house: There is my code:
Mysql connection i have defined and pass and host... In mysql log is no erros, but player gain bad message . Please help me with this problem
Код:
new House1; new House1[MAX_PLAYERS];
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == House1){ new query[256],string[256]; MySQLCheck(); format(query,sizeof(query),"SELECT Name FROM `"TABLENAME"` WHERE House = '1'"); mysql_query(query); mysql_store_result(); House1[playerid] = mysql_fetch_int(); mysql_free_result(); format(string,sizeof(string),"This house owns player: %s.",House1[playerid]); SendClientMessage(playerid,0xFFFFFFFF,string); return 1; } return 1; }