Undzwar läd mein Gangwarsystem die Gangzonefarben falsch und der Gebiets Name wird nicht ausgelesen...
enum Fraktionsenum{
f_name[128],
Float:f_x,
Float:f_y,
Float:f_z,
Float:f_r,
f_inter,
f_world,
gangfightable,
f_color
}
new fInfo[MAX_FRAKS][Fraktionsenum] = {
{"Zivilist", 0.0, 0.0, 0.0, 0.0, 0, 0, COLOR_WHITE},
{"LSPD", 295.2865,-55.4151,2.7772,293.463, 0, 0, 0, COLOR_BLUE},
{"Terror", 0.0, 0.0, 0.0, 0.0, 0, 0, 1, 785318},
{"Grove Street", 0.0, 0.0, 0.0, 0.0, 0, 0, 1, 0x26FF68A4},
{"Varrios Los Aztecas", 0.0, 0.0, 0.0, 0.0, 0, 0, 1, 0x0069FFAF},
{"The Smoker Lounge", -295.8035,-2146.9890,28.5814,204.8678, 0, 0, 1, 0xFF0005AB},
{"MLG",0.0, 0.0, 0.0, 0.0, 0, 0, 1, 0xFF9600BB},
{"Oamt",757.9287,-1339.2076,13.5301,268.5271, 0, 0, 1, 0xFF9600BB},
{"San News",0.0,0.0,0.0,0.0,0,0,1,0xFF8200FF},
{"Rettungsdienst",0.0,0.0,0.0,0.0,0,0,1,0x37FF00FF},
{"Los Santos Biker",757.9287,-1339.2076,13.5301,268.5271, 0, 0, 1, 0xFF9600BB}
};
//OnGameModeInit
for(new i = 1; i<MAX_GANGZONES; i++)
{
mysql_format(dbhandle, querye,256, "SELECT * FROM gangzones WHERE id = %d",i);
mysql_function_query(dbhandle, querye, true, "GangZonesLoad","d",i);
}
public GangZonesLoad(id)
{
new rows, field;
cache_get_data(rows, field);
if(!rows)return 1;
gwInfo[id][besitzer] = cache_get_row_int(0, 2);
cache_get_row(0, 1, gwInfo[id][f_gebiet]);
printf("Gangzoneid: %i = %s",id,gwInfo[id][f_gebiet]);
gwInfo[id][minx] = cache_get_row_float(0, 3);
gwInfo[id][miny] = cache_get_row_float(0, 4);
gwInfo[id][maxx] = cache_get_row_float(0, 5);
gwInfo[id][maxy] = cache_get_row_float(0, 6);
gwInfo[id][running] = cache_get_row_int(0, 9);
gwInfo[id][punkteAngreifer] = cache_get_row_int(0, 7);
gwInfo[id][punkteVerteidiger] = cache_get_row_int(0, 8);
gwInfo[id][angreifer] = cache_get_row_int(0, 13);
gwInfo[id][RemainingHour] = cache_get_row_int(0, 10);
gwInfo[id][RemainingMin] = cache_get_row_int(0, 11);
gwInfo[id][RemainingSec] = cache_get_row_int(0, 12);
CreateGangZones(id);
return 1;
}
stock CreateGangZones(id)
{
gangZone[id] = GangZoneCreate(gwInfo[id][minx],gwInfo[id][miny],gwInfo[id][maxx],gwInfo[id][maxy]);
gwInfo[id][Area] = Area_AddBox(gwInfo[id][minx],gwInfo[id][miny],gwInfo[id][maxx],gwInfo[id][maxy]);
UpdateGangZones(id);
return true;
}
stock UpdateGangZones(sid)
{
GangZoneHideForAll(sid);
GangZoneShowForAll(sid,fInfo[gwInfo[sid][besitzer]][f_color]);
if(gwInfo[sid][running]==1)
{
GangZoneFlashForAll(sid,fInfo[gwInfo[sid][angreifer]][f_color]);
}
return true;
}
Alles anzeigen