About housing.
#1

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:
Код:
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;
}
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
Reply
#2

Please answer...
Reply
#3

Stop bumping.

And 1 day read wiki pages if this so hard?

You selectin `Name` FROM TABLE WHERE HOUSE = 1

where you see logic?

Amazing MySQL Functions:

https://sampwiki.blast.hk/wiki/MySQL#Plugin_functions

And amazing SQL Intro: http://www.w3schools.com/sql/sql_intro.asp

That's all what you need..

Have a nice day.
Reply
#4

You are so angry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)