SA-MP Forums Archive
Gangzone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gangzone (/showthread.php?tid=295169)



Gangzone - zeulet - 05.11.2011

Hello I wanted to do a system / taketurf but I have a problem:
Код:
enum InfoTeritorii 
{ 
        ID, 
        Nume[50], 
        Float:MinX, 
    Float:MinY, 
    Float:MaxX, 
    Float:MaxY, 
    culoare[20], 
    idfactiune, 
         
}; 
 
new Teritorii[26][InfoTeritorii]; 
new Teritor[26];
onplayerspawn:
Код:
       for(new i = 0; i < sizeof(Teritor); i++) 
        { 
            GangZoneShowForPlayer(playerid, Teritor[i], Teritorii[i][culoare]); 
        }
gamemodeinit:
Код:
        LoadTeritorii(); 
 
        for(new i = 0; i < sizeof(Teritorii); i++) 
        { 
        Teritor[i] = GangZoneCreate(Teritorii[i][MinX],Teritorii[i][MinY],Teritorii[i][MaxX],Teritorii[i][MaxY]); 
        }
Код:
public LoadTeritorii() 
{ 
        new arrCoords[8][64]; 
        new strFromFile2[256]; 
        new File: file = fopen("teritorii.cfg", io_read); 
        if (file) 
        { 
                new idx; 
                while (idx < sizeof(Teritorii)) 
                { 
                        fread(file, strFromFile2); 
                        split(strFromFile2, arrCoords, '|'); 
                        Teritorii[idx][ID] = strval(arrCoords[0]); 
                        strmid(Teritorii[idx][Nume], arrCoords[1], 0, strlen(arrCoords[1]), 255); 
                        Teritorii[idx][MinX] = floatstr(arrCoords[2]); 
                        Teritorii[idx][MinY] = floatstr(arrCoords[3]); 
                        Teritorii[idx][MaxX] = floatstr(arrCoords[4]); 
                        Teritorii[idx][MaxY] = floatstr(arrCoords[5]); 
                        strmid(Teritorii[idx][culoare], arrCoords[6], 0, strlen(arrCoords[6]), 255); 
                        Teritorii[idx][idfactiune] = strval(arrCoords[7]); 
                        printf("%d|%d|%s|%f|%f|%f|%f|%s|%d\n", 
                        idx,Teritorii[idx][ID],Teritorii[idx][Nume],Teritorii[idx][MinX],Teritorii[idx][MinY],Teritorii[idx][MaxX],Teritorii[idx][MaxY],Teritorii[idx][culoare],Teritorii[idx][idfactiune]); 
                        idx++; 
                } 
                fclose(file); 
        } 
        return 1; 
}
But the problem is that I do not set the color of the territory, put any color (HEX) is black or white me.

Thanks , sorry for my bad english


Re: Gangzone - AeroBlast - 05.11.2011

Are you sure it has 0x at the front and FF or AA on the end? Not just 0xFF0000. THat would be black instead of red. It should be: 0xFF0000FF or 0xFF0000AA


Re: Gangzone - sleepysnowflake - 05.11.2011

The last 2 characters are Alpha values (transparency).

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


Re: Gangzone - zeulet - 05.11.2011

in "teritorii.cfg"
Код:
1|Da Nang Boys|1011.9133|2481.9333|1433.2172|2824.1028|0xFF9B9BA4|4
not working


Re: Gangzone - AeroBlast - 05.11.2011

Try 0xFF9B9BAA? I don't know if it helps.