Players have already house doesnt work
#1

Hello hear i am again yes sorry

I try to make that one player only can have on house in Mysql but it doesnt work i try

I have set this to see if the player has a house or not but now its sets even for players how doesnt have any house

Sorry for my english

Код:
HasHouse[playerid] =1;
This is te hole script
Код:
stock PlayerOwnHouse(playerid)
{
    new pname[24],QUERY[400];
    GetPlayerName(playerid, pname, 24);
    format(QUERY, sizeof(QUERY), "SELECT id FROM House WHERE Owner = '%s' LIMIT 1",pname);
    mysql_query(QUERY);
    mysql_store_result();
    HasHouse[playerid] =1;
    mysql_free_result();
}
Reply
#2

Up ? pls
Reply
#3

You aren't actually referencing the returned MySQL data. I would suggest reading the documentation for your MySQL plugin and figuring out how to see if your query was successful or not. In this case, if the query succeeded that would mean the player has a house.
Reply
#4

Dont understand can you give me any example please ?
Reply
#5

Found thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)