Spawn Player in House MYSQL
#1

Hello i have a probleme i try to create the spawn player in house but i does only teleports it to house id 0 if hes the owner but if het aint the owner it stil go search for id 0 and not the other id's


Her the code sorry for my english

Код:
stock SpawnPlayerAtHouse(playerid)
{
	new pname[24],QUERY[400],id;
    GetPlayerName(playerid, pname, 24);
 	format(QUERY, sizeof(QUERY), "SELECT * FROM House WHERE Owner = '%s' AND id = %i",pname,id);
    mysql_query(QUERY);
	mysql_store_result();
	while (mysql_retrieve_row())
	{
		SetPlayerPos(playerid, HouseInfo[id][hExitX], HouseInfo[id][hExitY], HouseInfo[id][hExitZ]);
		SetPlayerInterior(playerid, HouseInfo[id][hInterior]);
		SetPlayerVirtualWorld(playerid, id);
	}
	mysql_free_result();
}
Reply


Messages In This Thread
Spawn Player in House MYSQL - by BruLaX - 25.08.2013, 00:52
Re: Spawn Player in House MYSQL - by xXSPRITEXx - 25.08.2013, 01:20
Re: Spawn Player in House MYSQL - by [HiC]TheKiller - 25.08.2013, 01:40

Forum Jump:


Users browsing this thread: 1 Guest(s)