SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Română/Romanian

Reply
 
Thread Tools Display Modes
Old 03/08/2012, 05:35 PM   #1
Sp3cter
Huge Clucker
 
Join Date: Jul 2012
Posts: 213
Reputation: 11
Default Inca o problema....

Deci din nou am o alta problema !

Am 2 fisiere in scriptingfiles

gzone.cfg
cars.cfg

Daca modific in gzone.cfg dupa restart la server acesta revine la normal !
Daca modific in cars.cfg la fel !

Ma poate ajuta cineva ? (+rep)

Multumesc anticipat !
Sp3cter is offline   Reply With Quote
Old 03/08/2012, 08:55 PM   #2
Babica
Huge Clucker
 
Babica's Avatar
 
Join Date: Oct 2010
Location: Bucharest
Posts: 257
Reputation: 12
Default Re: Inca o problema....

N-am inteles nimic..incearca sa fii mai explicit..
__________________
Babica is offline   Reply With Quote
Old 03/08/2012, 11:32 PM   #3
[IZ]Kira
Big Clucker
 
[IZ]Kira's Avatar
 
Join Date: Aug 2010
Location: Italy, Regione Savona, Provincia Urbe San Piedro
Posts: 101
Reputation: 9
Default Re: Inca o problema....

Poate ca, in GM ii setat in script ca sa scrie in acele fisiere configurarile trecute in GM/FS [script] =D. Verifica in GM/FS asa: Apasa CTRL + F si scrie gzone.cfg si cauta ce apartine de el si setezi tu si apoi cauta si cars.cfg ^^
__________________
[IZ]Kira is offline   Reply With Quote
Old 04/08/2012, 05:29 AM   #4
Sp3cter
Huge Clucker
 
Join Date: Jul 2012
Posts: 213
Reputation: 11
Default Re: Inca o problema....

Deci despre cars.cfg am asa

Quote:
public LoadCar()
{
new arrCoords[30][64];
new strFromFile2[256];
new File: file = fopen("cars.cfg", io_read);
if (file)
{
new idx = 0;
while (idx < sizeof(CarInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
CarInfo[idx][cModel] = strval(arrCoords[0]);
CarInfo[idx][cLocationx] = floatstr(arrCoords[1]);
CarInfo[idx][cLocationy] = floatstr(arrCoords[2]);
CarInfo[idx][cLocationz] = floatstr(arrCoords[3]);
CarInfo[idx][cAngle] = floatstr(arrCoords[4]);
CarInfo[idx][cColorOne] = strval(arrCoords[5]);
CarInfo[idx][cColorTwo] = strval(arrCoords[6]);
strmid(CarInfo[idx][cOwner], arrCoords[7], 0, strlen(arrCoords[7]), 255);
strmid(CarInfo[idx][cDescription], arrCoords[8], 0, strlen(arrCoords[8]), 255);
CarInfo[idx][cValue] = strval(arrCoords[9]);
CarInfo[idx][cLicense] = strval(arrCoords[10]);
CarInfo[idx][cOwned] = strval(arrCoords[11]);
CarInfo[idx][cLock] = strval(arrCoords[12]);
CarInfo[idx][mod1] = strval(arrCoords[13]);
CarInfo[idx][mod2] = strval(arrCoords[14]);
CarInfo[idx][mod3] = strval(arrCoords[15]);
CarInfo[idx][mod4] = strval(arrCoords[16]);
CarInfo[idx][mod5] = strval(arrCoords[17]);
CarInfo[idx][mod6] = strval(arrCoords[18]);
CarInfo[idx][mod7] = strval(arrCoords[19]);
CarInfo[idx][mod8] = strval(arrCoords[20]);
CarInfo[idx][mod9] = strval(arrCoords[21]);
CarInfo[idx][mod10] = strval(arrCoords[22]);
CarInfo[idx][mod11] = strval(arrCoords[23]);
CarInfo[idx][mod12] = strval(arrCoords[24]);
CarInfo[idx][mod13] = strval(arrCoords[25]);
CarInfo[idx][mod14] = strval(arrCoords[26]);
CarInfo[idx][mod15] = strval(arrCoords[27]);
CarInfo[idx][mod16] = strval(arrCoords[28]);
CarInfo[idx][mod17] = strval(arrCoords[29]);
printf("CarInfo: %d Owner:%s LicensePlate %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cLicense]);
idx++;
}
}
return 1;
}
Quote:
public SaveCars()
{
new idx;
new File: file2;
while (idx < sizeof(CarInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%s,%d,%d,%d,%d,%d,% d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
CarInfo[idx][cModel],
CarInfo[idx][cLocationx],
CarInfo[idx][cLocationy],
CarInfo[idx][cLocationz],
CarInfo[idx][cAngle],
CarInfo[idx][cColorOne],
CarInfo[idx][cColorTwo],
CarInfo[idx][cOwner],
CarInfo[idx][cDescription],
CarInfo[idx][cValue],
CarInfo[idx][cLicense],
CarInfo[idx][cOwned],
CarInfo[idx][cLock],
CarInfo[idx][mod1],
CarInfo[idx][mod2],
CarInfo[idx][mod3],
CarInfo[idx][mod4],
CarInfo[idx][mod5],
CarInfo[idx][mod6],
CarInfo[idx][mod7],
CarInfo[idx][mod8],
CarInfo[idx][mod9],
CarInfo[idx][mod10],
CarInfo[idx][mod11],
CarInfo[idx][mod12],
CarInfo[idx][mod13],
CarInfo[idx][mod14],
CarInfo[idx][mod15],
CarInfo[idx][mod16],
CarInfo[idx][mod17]);
if(idx == 0)
{
file2 = fopen("cars.cfg", io_write);
}
else
{
file2 = fopen("cars.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}

Iar la gzones.cfg am asa

Quote:
public LoadZones()
{
new arrCoords[6][64];
new strFromFile2[256];
new File: file = fopen("gzones.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(ZoneInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
strmid(ZoneInfo[idx][zOwner], arrCoords[0], 0, strlen(arrCoords[0]), 255);
ZoneInfo[idx][zMinX] = floatstr(arrCoords[1]);
ZoneInfo[idx][zMinY] = floatstr(arrCoords[2]);
ZoneInfo[idx][zMaxX] = floatstr(arrCoords[3]);
ZoneInfo[idx][zMaxY] = floatstr(arrCoords[4]);
ZoneInfo[idx][zTeam] = strval(arrCoords[5]);
printf("[%d] Team: %d | Leader: %s",idx,ZoneInfo[idx][zTeam],ZoneInfo[idx][zOwner]);
idx++;
}
fclose(file);
}
return 1;
}
Quote:
public SaveZones()
{
new idx;
new File: file2;
while (idx < sizeof(ZoneInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%s|%f|%f|%f|%f|%d\n",
ZoneInfo[idx][zOwner],
ZoneInfo[idx][zMinX],
ZoneInfo[idx][zMinY],
ZoneInfo[idx][zMaxX],
ZoneInfo[idx][zMaxY],
ZoneInfo[idx][zTeam]);
if(idx == 0)
{
file2 = fopen("gzones.cfg", io_write);
}
else
{
file2 = fopen("gzones.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}
Quote:
LoadZones();
for(new i=0; i < sizeof(ZoneInfo); i++)
{
Zones[i] = GangZoneCreate(ZoneInfo[i][zMinX], ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
}
for(new i = 0; i < sizeof(TurfInfo); i++)
{
Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
LCN = GangZoneCreate(1078.739501, -2092.871093, 1286.739501, -1996.870971);
YKZ = GangZoneCreate(-2287.976562, 577.909362, -2143.976562, 737.909362);
BZ = GangZoneCreate(2398.740966, -1777.926391, 2558.740966, -1617.926391);
CZ = GangZoneCreate(2072.419921, -1576.856201, 2160.419921, -1344.856201);
NZ = GangZoneCreate(2078.751220, -1079.838867, 2262.751220, -967.83892;
SZ = GangZoneCreate(1656.512939, -2152.463378, 1832.512939, -2080.46337;
SPW = GangZoneCreate(1647.118286, -1917.144165, 1855.118286, -1813.144165);
SPWSF = GangZoneCreate(-2116.569, -139.7016, -1923.435, 357.3639);

}
Sp3cter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inca O problema BoSs_S Română/Romanian 0 24/01/2012 07:15 PM
Revin cu inca o problema... IcE. Română/Romanian 14 15/07/2011 05:09 PM
Inca o problema ElFoXina Română/Romanian 2 13/05/2010 07:30 AM


All times are GMT. The time now is 10:07 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.