#define MAX_HOUSE 200new Text3D:HouseText[MAX_HOUSE]; //Házhoznew HousePick[MAX_HOUSE]; //Házhozenum hInfo{Float:hEnterancex,Float:hEnterancey,Float:hEnterancez,Float:hExitx,Float:hExity,Float:hExitz,hInterior,hValue,hRoom,hOwner,hOwned,};new HouseInfo[MAX_HOUSE][hInfo];public OnGameModeInit(){for(new i; i < MAX_HOUSE; i ++){ LoadHouse(i);}return 1;}stock LoadHouse(HouseID){new S[600];format(File, sizeof(File), \"Házak/%d.ini\", HouseID);if(dini_Exists(File)){ HouseInfo[HouseID][hEnterancex] = dini_Float(File, \"Entrancex\"); HouseInfo[HouseID][hEnterancey] = dini_Float(File, \"Enterancey\"); HouseInfo[HouseID][hEnterancez] = dini_Float(File, \"Enterancez\"); HouseInfo[HouseID][hExitx] = dini_Float(File, \"Exitx\"); HouseInfo[HouseID][hExity] = dini_Float(File, \"Exity\"); HouseInfo[HouseID][hExitz] = dini_Float(File, \"Exitz\"); HouseInfo[HouseID][hInterior] = dini_Int(File, \"Interior\"); HouseInfo[HouseID][hRoom] = dini_Int(File, \"Room\"); HouseInfo[HouseID][hValue] = dini_Int(File, \"Value\"); HouseInfo[HouseID][hOwned] = dini_Int(File, \"Owned\"); format(HouseInfo[HouseID][hOwner], 24, \"%s\", dini_Get(File, \"Owner\")); if(HouseInfo[HouseID][hOwned] == 0){ format(S, sizeof(S), \"Eladó Ház!\\nTulajdonos: Nincs\\nÁr: %d$\", HouseInfo[HouseID][hValue]); HouseText[HouseID] = Create3DTextLabel(S, -1, HouseInfo[HouseID][hEnterancex], HouseInfo[HouseID][hEnterancey], HouseInfo[HouseID][hEnterancez], 25, 0, 1); HousePick[HouseID] = CreatePickup(1239, 1,HouseInfo[HouseID][hEnterancex], HouseInfo[HouseID][hEnterancey], HouseInfo[HouseID][hEnterancez], 0);}else if(HouseInfo[HouseID][hOwned] == 1){ format(S, sizeof(S), \"Tulajdonos: %s\", HouseInfo[HouseID][hOwner]); HouseText[HouseID] = Create3DTextLabel(S, -1, HouseInfo[HouseID][hEnterancex], HouseInfo[HouseID][hEnterancey], HouseInfo[HouseID][hEnterancez], 25, 0, 1); HousePick[HouseID] = CreatePickup(1318, 1,HouseInfo[HouseID][hEnterancex], HouseInfo[HouseID][hEnterancey], HouseInfo[HouseID][hEnterancez], 0);}}}stock SaveHouse(HouseID){format(File, sizeof(File), \"Házak/%d.ini\", HouseID);if(dini_Exists(File)){ dini_FloatSet(File, \"Enterancex\", HouseInfo[HouseID][hEnterancex]);dini_FloatSet(File, \"Enterancey\", HouseInfo[HouseID][hEnterancey]);dini_FloatSet(File, \"Enterancez\", HouseInfo[HouseID][hEnterancez]);dini_FloatSet(File, \"Exitx\", HouseInfo[HouseID][hExitx]);dini_FloatSet(File, \"Exity\", HouseInfo[HouseID][hExity]);dini_FloatSet(File, \"Exitz\", HouseInfo[HouseID][hExitz]);dini_IntSet(File, \"Interior\", HouseInfo[HouseID][hInterior]);dini_IntSet(File, \"Room\", HouseInfo[HouseID][hRoom]);dini_IntSet(File, \"Value\", HouseInfo[HouseID][hValue]);dini_IntSet(File, \"Owned\", HouseInfo[HouseID][hOwned]);dini_Set(File, \"Owner\", HouseInfo[HouseID][hOwner]);}}
Csinálj neki parancsott ami létrehozza a házat
ékezeten nélkül próbáld meg tehat Hazak
3 ra otthon vagyok megnézem hátha tudok valamit kezdeni a dologgal de a mysql jobb...
print(\"ház betöltve\");
printf(\"X: %.4f Y: %.4f Z: %.4f\",HouseInfo[HouseID][hEnterancex],HouseInfo[HouseID][hEnterancey].HouseInfo[HouseID][hEnterancez]);
enum hInfo{ Float:hEnterancex, Float:hEnterancey, Float:hEnterancez, Float:hExitx, Float:hExity, Float:hExitz, hInterior, hValue, hRoom, hOwner, //<- Ez hOwned,};
enum hInfo{Float:hEnterancex,Float:hEnterancey,Float:hEnterancez,Float:hExitx,Float:hExity,Float:hExitz,hInterior,hValue,hRoom,hOwner[MAX_PLAYER_NAME],hOwned};