Yea, geil gescriptet...
Mein Server friert ein, sobald ich mehrere MySQL Sachen lade
z.B. Fraktionskassen + Gangzonen...
Hier die beiden publics
public LoadFightzonesSQL()
{
new fs,Query[1024];
while(fs<sizeof(FightSystem))
{
format(Query,1024,"SELECT * FROM `gangzones` WHERE `id`='%d'",fs);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_fetch_field("Besitzer",Query); FightSystem[fs][OwnerFaction] = strval(Query);
FightSystem[fs][ZoneID] = GangZoneCreate(FightSystem[fs][gfMinX],FightSystem[fs][gfMinY],FightSystem[fs][gfMaxX],FightSystem[fs][gfMaxY]);
}
break;
}
mysql_free_result();
GangFight = TextDrawCreate(88.000000,244.000000,"Gangfight:~n~_~n~_~n~_~n~_~n~_");
TextDrawUseBox(GangFight,1);
TextDrawBoxColor(GangFight,0x00000066);
TextDrawTextSize(GangFight,102.000000,124.000000);
TextDrawAlignment(GangFight,2);
TextDrawBackgroundColor(GangFight,0xff000033);
TextDrawFont(GangFight,2);
TextDrawLetterSize(GangFight,0.499999,1.000000);
TextDrawColor(GangFight,0xffffffff);
TextDrawSetOutline(GangFight,1);
TextDrawSetProportional(GangFight,1);
GangFightUnderline = TextDrawCreate(91.000000,274.000000,".");
TextDrawAlignment(GangFightUnderline,2);
TextDrawBackgroundColor(GangFightUnderline,0x000000ff);
TextDrawFont(GangFightUnderline,3);
TextDrawLetterSize(GangFightUnderline,14.799997,1.000000);
TextDrawColor(GangFightUnderline,0xffffffff);
TextDrawSetProportional(GangFightUnderline,1);
TextDrawSetShadow(GangFightUnderline,1);
while(fs < sizeof(FightSystem))
{
FightSystem[fs][WinFaction] = TextDrawCreate(26.000000,256.000000," ");
TextDrawSetProportional(FightSystem[fs][WinFaction],1);
TextDrawAlignment(FightSystem[fs][WinFaction],0);
TextDrawBackgroundColor(FightSystem[fs][WinFaction],0x000000ff);
TextDrawFont(FightSystem[fs][WinFaction],2);
TextDrawLetterSize(FightSystem[fs][WinFaction],0.199999,1.000000);
TextDrawColor(FightSystem[fs][WinFaction],0xffffffff);
TextDrawSetOutline(FightSystem[fs][WinFaction],1);
FightSystem[fs][LoseFaction] = TextDrawCreate(26.000000,267.000000," ");
TextDrawSetProportional(FightSystem[fs][LoseFaction],1);
TextDrawSetOutline(FightSystem[fs][LoseFaction],1);
TextDrawColor(FightSystem[fs][LoseFaction],0xffffffff);
TextDrawFont(FightSystem[fs][LoseFaction],2);
TextDrawLetterSize(FightSystem[fs][LoseFaction],0.199999,0.899999);
TextDrawBackgroundColor(FightSystem[fs][LoseFaction],0x000000ff);
TextDrawAlignment(FightSystem[fs][LoseFaction],0);
FightSystem[fs][WinKills] = TextDrawCreate(107.000000,256.000000," ");
TextDrawSetProportional(FightSystem[fs][WinKills],1);
TextDrawSetOutline(FightSystem[fs][WinKills],1);
TextDrawColor(FightSystem[fs][WinKills],0xffffffff);
TextDrawSetShadow(FightSystem[fs][WinKills],1);
TextDrawFont(FightSystem[fs][WinKills],2);
TextDrawLetterSize(FightSystem[fs][WinKills],0.199999,1.000000);
TextDrawBackgroundColor(FightSystem[fs][WinKills],0x000000ff);
TextDrawAlignment(FightSystem[fs][WinKills],0);
FightSystem[fs][LoseKills] = TextDrawCreate(107.000000,267.000000," ");
TextDrawSetProportional(FightSystem[fs][LoseKills],1);
TextDrawSetShadow(FightSystem[fs][LoseKills],1);
TextDrawSetOutline(FightSystem[fs][LoseKills],1);
TextDrawColor(FightSystem[fs][LoseKills],0xffffffff);
TextDrawFont(FightSystem[fs][LoseKills],2);
TextDrawLetterSize(FightSystem[fs][LoseKills],0.199999,1.000000);
TextDrawBackgroundColor(FightSystem[fs][LoseKills],0x000000ff);
TextDrawAlignment(FightSystem[fs][LoseKills],0);
FightSystem[fs][fsTime] = TextDrawCreate(26.000000,286.000000," ");
TextDrawColor(FightSystem[fs][fsTime],0xffffffff);
TextDrawAlignment(FightSystem[fs][fsTime],0);
TextDrawBackgroundColor(FightSystem[fs][fsTime],0x000000ff);
TextDrawFont(FightSystem[fs][fsTime],2);
TextDrawLetterSize(FightSystem[fs][fsTime],0.199999,0.899999);
TextDrawSetProportional(FightSystem[fs][fsTime],1);
fs++;
}
return 1;
}
forward LoadFraktionsKassenSQL();
public LoadFraktionsKassenSQL()
{
new idx,Query[1024];
while(idx<sizeof(FraktionsKasse))
{
format(Query,1024,"SELECT * FROM `fraktionskassen` WHERE `Fraktion`='%d'",idx);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_fetch_field("Geld",Query); FraktionsKasse[idx] = strval(Query);
}
}
mysql_free_result();
return 1;
}