MySQL - R38 loading houses help
#1

Hi, anyone have an idea how to load EVERY houses stored into the database with the lastest plugins R38, cant figured it out it should be similar to the player account like this:

Код:
stock LoadAccount(playerid)
{
	new query[128];

	format(query, sizeof(query), "SELECT * FROM `players` WHERE `ID` = %d", PlayerInfo[playerid][pSQLid]);
	mysql_tquery(g_Handle, query, "OnAccountLoad", "d", playerid);
}

forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
	ToggleMainMenu(playerid, 0);
	SetCameraBehindPlayer(playerid);

	PlayerInfo[playerid][pHealth]         = cache_get_field_content_float(0, "Health");
	PlayerInfo[playerid][pPos][0]         = cache_get_field_content_float(0, "PosX");
	PlayerInfo[playerid][pPos][1]         = cache_get_field_content_float(0, "PosY");
	PlayerInfo[playerid][pPos][2]         = cache_get_field_content_float(0, "PosZ");
	PlayerInfo[playerid][pPos][3]         = cache_get_field_content_float(0, "Angle");
	PlayerInfo[playerid][pInterior]       = cache_get_field_content_int(0, "Interior");
	PlayerInfo[playerid][pVirtualWorld]   = cache_get_field_content_int(0, "VirtualWorld");
	PlayerInfo[playerid][pSkin]           = cache_get_field_content_int(0, "Skin");
	PlayerInfo[playerid][pSex]            = cache_get_field_content_int(0, "Sex");
	PlayerInfo[playerid][pAge]            = cache_get_field_content_int(0, "Age");
	PlayerInfo[playerid][pOrigine]        = cache_get_field_content_int(0, "Origine");
	PlayerInfo[playerid][pMoney]          = cache_get_field_content_int(0, "Money");
	PlayerInfo[playerid][pJob]            = cache_get_field_content_int(0, "Job");
	PlayerInfo[playerid][pFaction]        = cache_get_field_content_int(0, "Faction");

	SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
	SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], posArr{PlayerInfo[playerid][pPos]}, PlayerInfo[playerid][pPos][3], 0, 0, 0, 0, 0, 0);
	SpawnPlayer(playerid);
	/*SetPlayerPos(playerid, posArr{PlayerInfo[playerid][pPos]});
	SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos][3]);*/
	SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]);
	SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
	SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
	GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
	return 1;
}
need the same who loop through all houses created into the database and then create the 3dtext etc... any ideas ?

thanks in advance
Reply


Messages In This Thread
MySQL - R38 loading houses help - by vernz - 23.04.2014, 00:03
Re: MySQL - R38 loading houses help - by DobbysGamertag - 23.04.2014, 00:07
Re : MySQL - R38 loading houses help - by vernz - 23.04.2014, 00:15
Re: MySQL - R38 loading houses help - by DobbysGamertag - 23.04.2014, 00:20
Re : MySQL - R38 loading houses help - by vernz - 23.04.2014, 00:30
Re: MySQL - R38 loading houses help - by DobbysGamertag - 23.04.2014, 01:06
Re : MySQL - R38 loading houses help - by vernz - 23.04.2014, 01:07
Re: MySQL - R38 loading houses help - by DobbysGamertag - 23.04.2014, 01:09
Re : MySQL - R38 loading houses help - by vernz - 23.04.2014, 01:14
Re: MySQL - R38 loading houses help - by DobbysGamertag - 23.04.2014, 01:19

Forum Jump:


Users browsing this thread: 1 Guest(s)