30.09.2015, 20:48
So after capturing a zone, I have this code:
but it just goes transparent and no color is set for the zone.
hextoint stock:
Код:
GangZoneStopFlashForAll(GangZone[zoneid][ZoneHolder]); new colour[9]; format(colour, 9, "%s50", Gang[gangid][GangColor]); GangZoneShowForAll(GangZone[zoneid][ZoneHolder], HexToInt(colour));
hextoint stock:
Код:
stock HexToInt(string[]) // DracoBlue { if (string[0] == 0) return 0; new i, cur=1, res = 0; for (i=strlen(string);i>0;i--) { if (string[i-1]<58) res=res+cur*(string[i-1]-48); else res=res+cur*(string[i-1]-65+10); cur=cur*16; } return res; }