23.04.2014, 00:03
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:
need the same who loop through all houses created into the database and then create the 3dtext etc... any ideas ?
thanks in advance
Код:
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; }
thanks in advance