Hallo! Kann mir jemand helfen? Ich wollte diesen Wert, der Momentan noch im Script steht in eine Datei packen:
new Gebiete[1][gInfo] = {
{6,421.737884,-1995.817138,323.132476,-2100.944091,0,0,0,0}
//{0,0.0,0.0,0.0,0.0,0,0,0,0}, example 2.
};
Das habe ich schon erstellt:
enum gInfo//Dies leitet eine genauere Beschreibung für einen Array ein.
{
gOwner,//Hier wird die Fraktionsid gespeichert, der das Gebiet im moment gehört
Float:gMinX,//MinX - Koordinate für die Gangzone
Float:gMinY,//MinY
Float:gMaxX,//MaxX
Float:gMaxY,//MaxY
gOn,//Ob der Gangfight läuft
gStand1,//Der Score für das Owner Team
gStand2,//Score für die Angreifer
gAngreifer//Hier wird die Fraktionsid gespeichert
};
new GangInfo[130][gInfo];
public LoadGangZones()
{
new arrCoords[29][64];
new strFromFile2[256];
new File: file = fopen("gangzones.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(GangInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
GangInfo[idx][gOwner] = strval(arrCoords[0]);//Hier wird die Fraktionsid gespeichert, der das Gebiet im moment gehört
GangInfo[idx][gMinX] = floatstr(arrCoords[1]);//MinX - Koordinate für die Gangzone
GangInfo[idx][gMinY] = floatstr(arrCoords[2]);//MinY
GangInfo[idx][gMaxX] = floatstr(arrCoords[3]);//MaxX
GangInfo[idx][gMaxY] = floatstr(arrCoords[4]);//MaxY
GangInfo[idx][gOn] = strval(arrCoords[5]);//Ob der Gangfight läuft
GangInfo[idx][gStand1] = strval(arrCoords[6]);//Der Score für das Owner Team
GangInfo[idx][gStand2] = strval(arrCoords[7]);//Score für die Angreifer
GangInfo[idx][gAngreifer] = strval(arrCoords[8]);//Hier wird die Fraktionsid gespeichert
idx++;
}
fclose(file);
}
return 1;
}