Function LoadFraktionsKassen()
{
new File:Kasse = fopen("Fraktionskassen.cfg",io_read);
new idx = 0;
new read[128];
while(idx < sizeof(FraktionsKasse))
{
fread(Kasse,read);
for(new x=0; x<strlen(read); x++)
{
if(read[x]== '\n')
{
read[x] = '\0';
}
}
FraktionsKasse[idx] = strval(read);
idx++;
}
fclose(Kasse);
return 1;
}
Function ShowLotto()
{
LottoTimer = 180;
OOCOff(COLOR_LIGHTGREEN, "Die Lottozentrale informiert: Das Lottospiel wird in 3 Minuten gestartet !");
}
Function SaveFraktionsKassen()
{
new File:Kasse = fopen("Fraktionskassen.cfg",io_write);
new write[24];
for(new idx; idx < sizeof(FraktionsKasse); idx++)
{
format(write,sizeof(write),"%d\n",FraktionsKasse[idx]);
fwrite(Kasse,write);
}
fclose(Kasse);
return 1;
}
stock HouseSave()
{
for(new h;h<MAX_HOUSES;h++)
{
if(HouseInfo[h][hx]!=0)
{
new bedien[128],updatestring[128];
format(bedien,sizeof(bedien),"`hID`='%i'",h);
format(updatestring,128,"%s",HouseInfo[h][hOwner]);
mysqlupdate("housedata",bedien,"hOwner",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hPreis]);
mysqlupdate("housedata",bedien,"hPreis",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hMPreis]);
mysqlupdate("housedata",bedien,"hMPreis",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hM]);
mysqlupdate("housedata",bedien,"hM",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hKasse]);
mysqlupdate("housedata",bedien,"hKasse",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hSellpreis]);
mysqlupdate("housedata",bedien,"hSellpreis",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hbuystate]);
mysqlupdate("housedata",bedien,"hbuystate",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hHeal]);
mysqlupdate("housedata",bedien,"hHeal",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hArmour]);
mysqlupdate("housedata",bedien,"hArmour",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hWaffenbox]);
mysqlupdate("housedata",bedien,"hWaffenbox",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hInt]);
mysqlupdate("housedata",bedien,"hInt",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hVir]);
mysqlupdate("housedata",bedien,"hVir",updatestring);
format(updatestring,128,"%f",HouseInfo[h][hx]);
mysqlupdate("housedata",bedien,"hx",updatestring);
format(updatestring,128,"%f",HouseInfo[h][hy]);
mysqlupdate("housedata",bedien,"hy",updatestring);
format(updatestring,128,"%f",HouseInfo[h][hz]);
mysqlupdate("housedata",bedien,"hz",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hiInt]);
mysqlupdate("housedata",bedien,"hiInt",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hiVir]);
mysqlupdate("housedata",bedien,"hiVir",updatestring);
format(updatestring,128,"%f",HouseInfo[h][hix]);
mysqlupdate("housedata",bedien,"hix",updatestring);
format(updatestring,128,"%f",HouseInfo[h][hiy]);
mysqlupdate("housedata",bedien,"hiy",updatestring);
format(updatestring,128,"%f",HouseInfo[h][hiz]);
mysqlupdate("housedata",bedien,"hiz",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hlock]);
mysqlupdate("housedata",bedien,"hlock",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hClubstate]);
mysqlupdate("housedata",bedien,"hClubstate",updatestring);
format(updatestring,128,"%d",HouseInfo[h][hClub]);
mysqlupdate("housedata",bedien,"hClub",updatestring);
format(updatestring,128,"%f",HouseInfo[h][schildx]);
mysqlupdate("housedata",bedien,"schildx",updatestring);
format(updatestring,128,"%f",HouseInfo[h][schildy]);
mysqlupdate("housedata",bedien,"schildy",updatestring);
format(updatestring,128,"%f",HouseInfo[h][schildz]);
mysqlupdate("housedata",bedien,"schildz",updatestring);
printf("HausID:%d hOwner:%s",h,HouseInfo[h][hOwner]);
}
}
}