Jump to content
  • 0

Problema gzones


Heaven.

Question

Buna , deci am am luat un file de nume gzones,cfg dintr-un server , si l-am bagat la mine pe server !

gzones.cfg , sunt cordonatele de la zone de take

take merge totul ok , dar mi-a aparut o zona albastra care nustiu ce sa fac ca sa fie de culoare albastra transparenta , ex:7b5df98c7b.png

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Spoiler

Alpine|1639.991699|-2317.559570|2204.397949|-1893.470581|13
Alpine|2204.397949|-2270.782470|2846.198974|-1893.470581|12
Alpine|2246.199218|-2718.782470|2846.199218|-2270.782470|12
Alpine|2488.300048|-1893.470581|2914.198730|-1478.157470|12
Alpine|1077.681396|-1893.470581|1472.058227|-1416.136596|13
Alpine|1472.058227|-1591.263916|2119.043212|-1253.456420|13
Alpine|2119.043212|-1893.470581|2488.300048|-1253.456420|13
Alpine|1472.058227|-1893.470581|2119.043212|-1591.263916|13
sEEkEr.|1077.681396|-1416.136596|1472.058227|-974.055541|14
sEEkEr.|1472.095336|-1253.456420|1976.095336|-974.058471|14
sEEkEr.|1976.095336|-1253.456420|2488.300048|-974.075073|14
sEEkEr.|2488.300048|-1480.537109|2867.300048|-1040.537109|14
Alpine|149.824523|-1893.470581|821.824523|-1659.303588|15
Alpine|821.824523|-1893.470581|1077.681396|-1416.136596|15
Alpine|242.165924|-1659.303588|821.824523|-1416.136596|15
Alpine|629.681457|-1416.136596|1077.681396|-1024.667358|15
 

Aici si gzones.cfg

Edited by Heaven.
Link to comment
Share on other sites

  • 0
Spoiler

public LoadZones()
{
    new arrCoords[6][64];
    new strFromFile2[256];
    new File: file = fopen("cfg/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("ID:%d Team:%d Owner:%s",idx,ZoneInfo[idx][zTeam],ZoneInfo[idx][zOwner]);
            idx++;
        }
        fclose(file);
    }
    return 1;
}
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("cfg/gzones.cfg", io_write);
        }
        else
        {
            file2 = fopen("cfg/gzones.cfg", io_append);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    return 1;
}

 

 

Edited by Heaven.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.