[Ajuda] Organizar linhas das casas [SV RPG]
#1

Olб pessoal! Quem jб mecheu com servidor RPG sabe que no Scriptfiles tem uma pasta onde ficam os dados de todas as casas do servidor...a ordem й a seguinte:

pawn Код:
HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
            HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
            HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
            HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
            HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
            HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
            HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
            HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
            HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
            HouseInfo[idx][hArmorrx] = strval(arrCoords[9]);
            HouseInfo[idx][hArmorry] = strval(arrCoords[10]);
            HouseInfo[idx][hArmorrz] = strval(arrCoords[11]);
            //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
            strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
            strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
            HouseInfo[idx][hValue] = strval(arrCoords[14]);
            HouseInfo[idx][hHel] = strval(arrCoords[15]);
            HouseInfo[idx][hArm] = strval(arrCoords[16]);
            HouseInfo[idx][hInt] = strval(arrCoords[17]);
            HouseInfo[idx][hLock] = strval(arrCoords[18]);
            HouseInfo[idx][hOwned] = strval(arrCoords[19]);
            HouseInfo[idx][hRooms] = strval(arrCoords[20]);
            HouseInfo[idx][hRent] = strval(arrCoords[21]);
            HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
            HouseInfo[idx][hTakings] = strval(arrCoords[23]);
            HouseInfo[idx][hVec] = strval(arrCoords[24]);
            if(HouseInfo[idx][hVec] == 587)
            {
                HouseInfo[idx][hVec] = 587;
            }
            HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
            HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
            HouseInfo[idx][hDate] = strval(arrCoords[27]);
            HouseInfo[idx][hLevel] = strval(arrCoords[28]);
            HouseInfo[idx][hWorld] = strval(arrCoords[29]);
Porйm os dados no arquivo .cfg ficam todos juntos um na frente do outro:
pawn Код:
-911.369506,2686.250488,42.370262,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,1,30,1,1000,587,-1,-1,223,1,0
2144.031982,-1802.946166,16.140625,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,1,200,1,11000,587,-1,-1,223,1,1
984.745117,-1830.545288,13.332736,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,1,200,1,200,475,-1,-1,223,4,2
973.376159,-1827.722290,13.330237,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,0,200,1,0,475,-1,-1,223,4,3
962.078796,-1824.764770,13.322690,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,1,50000,1,200,475,-1,-1,223,4,4
927.114562,-1818.777709,13.324458,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,0,200,1,9001,475,-1,-1,223,4,5
915.588806,-1817.423095,13.306715,235.508987,1189.169921,1080.339965,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,3,1,0,0,200,0,1000,475,-1,-1,223,2,6
977.436767,-770.559082,112.202629,244.369003,305.024902,999.148376,0,0,0,0,0,0,O estado,Casa Free,5000000,0,0,1,1,0,1,200,1,600,587,-1,-1,259,5,7
1939.239379,-1115.098388,27.452295,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,1,200,1,200,475,-1,-1,223,4,8
2000.150634,-1115.077758,27.131803,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,1,0,0,6,1,0,0,200,1,1800,475,-1,-1,223,5,9
2095.265380,-1145.288940,26.592920,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,500000,0,0,6,1,0,0,200,1,0,475,-1,-1,223,14,10
2091.601806,-1279.382568,26.085727,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Power,100000,0,0,6,1,0,0,200,1,400,475,-1,-1,223,100,11
2111.229248,-1279.677001,25.687500,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Power,100000,0,0,6,1,0,0,200,1,0,475,-1,-1,223,100,12
2132.261474,-1280.812500,25.890625,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Power,100000,0,0,6,1,0,0,200,1,400,475,-1,-1,223,100,13
1969.307006,-1706.175781,15.968750,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,10,0,0,6,1,0,0,5000,1,600,475,-1,-1,223,5,14
1981.427246,-1718.925537,17.030305,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa VIP,2000000,0,0,6,1,0,0,200,0,0,475,-1,-1,223,12,15
2016.918823,-1703.352416,14.173309,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,3000000,0,0,6,1,0,0,200,1,0,475,-1,-1,223,7,16
2015.447265,-1717.015380,13.554677,2324.419921,-1145.568359,1050.710083,0,0,0,0,0,0,O estado,Casa Free,1000000,0,0,12,1,0,1,200,1,0,475,-1,-1,223,8,17
2014.019287,-1732.669799,14.171996,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,2500000,0,0,6,1,0,0,200,1,0,587,-1,-1,223,6,18
1982.383300,-1682.898803,17.053806,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,1000000,0,0,6,1,0,0,200,1,200,475,-1,-1,223,4,19
2012.892456,-1656.418701,13.554677,234.084304,1064.689575,1084.210815,0,0,0,0,0,0,O estado,Casa Free,1000000,0,0,6,1,0,0,200,1,10000
Eu vi uma vez um sv onde esse arquivo casas.cfg ficava todo organizado cada linha tinha os dados de apenas 1 casa entende? assim dava pra organizar tudo, como faзo pra organizar esse arquivo? minha real intenзгo й mudar as casas de LS pra LV mas nгo tem como se todos os nъmeros de todas as casas ficarem assim juntos :/
Reply
#2

https://sampwiki.blast.hk/wiki/Fwrite

Код:
fwrite(File, "Texto\r\n");
Usando \r\n, pula para nova linha, deixando o arquivo organizado.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)