new housesGz[500]; new bizesGz[200]; new moneyGz[100]; for(new gz=0; gz < sizeof(Gangzones); gz++) { housesGz[gz] = 0; bizesGz[gz] = 0; moneyGz[gz] = 10000; for(new hid=0; hid < sizeof(House); hid++) { if(IsCoordsInArea(House[hid][House_x], House[hid][House_y], Gangzones[gz][maxX], Gangzones[gz][minX], Gangzones[gz][maxY], Gangzones[gz][minY ])) { housesGz[gz]++; } } for(new bid=0; bid < sizeof(biz); bid++) { if(IsCoordsInArea(biz[bid][bizenter_x], biz[bid][bizenter_y], Gangzones[gz][maxX], Gangzones[gz][minX], Gangzones[gz][maxY], Gangzones[gz][minY])) { bizesGz[gz]++; } } SendClientMessage(playerid, COLOR_RED, "Pass till 1"); if(Gangzones[gz][gFACTION] != 255 || Gangzones[gz][gFACTION] != -1 || Gangzones[gz][gFACTION] != 0) { moneyGz[gz] = housesGz[gz] + bizesGz[gz] * 12500; new fcabankx[128], fcabank; format(fcabankx,sizeof(fcabankx),"%sBank",GetFactionName(Gangzones[gz][gFACTION])); SendClientMessage(playerid, COLOR_RED, "Pass till 2"); fcabank = dini_Int(globalstats,fcabankx); dini_IntSet(globalstats, fcabankx, fcabank + moneyGz[gz]); SendClientMessage(playerid, COLOR_RED, "Pass till 3"); printf("[DEBUG] Faction %s turf money set!",GetFactionName(Gangzones[gz][gFACTION])); } }
stock GetFactionName ( factionid ) { return teams[ GetTeam(factionid) ][teamname]; }
return teams[ GetTeam(factionid) ][teamname];
return teams[ factionid ][teamname];
stock GetHousesInTurf(ixa) { new hs=0; for(new h = 0; h < sizeof(House);h++) { if(IsCoordsInArea(House[h][House_x], House[h][House_y], Gangzones[ixa][maxX], Gangzones[ixa][minX], Gangzones[ixa][maxY], Gangzones[ixa][minY])) { hs++; } } return hs; } stock GetBizsInTurf(ixab) { new bz=0; for(new b = 0; b < sizeof(biz);b++) { if(IsCoordsInArea(biz[b][bizexit_x], biz[b][bizexit_y], Gangzones[ixab][maxX], Gangzones[ixab][minX], Gangzones[ixab][maxY], Gangzones[ixab][minY])) { bz++; } } return bz; } stock TurfDay() { for(new i=0;i<sizeof(Gangzones);i++) { Gangzones[i][gEARN] = 0; new houses = GetHousesInTurf(i); new bizes = GetBizsInTurf(i); Gangzones[i][gEARN] = houses + bizes * 12500; if(Gangzones[i][gFACTION] != 255 || Gangzones[i][gFACTION] != -1 || Gangzones[i][gFACTION] != 0) { teams[Gangzones[i][gFACTION]][teamturf]++; teams[Gangzones[i][gFACTION]][teamearn] += Gangzones[i][gEARN]; teams[Gangzones[i][gFACTION]][teamearn] += 10000; } } for(new f=0;f<16;f++) { if(f != 0 || f != 255 || f != -1 || f != 7 || f != 8 || f != 9 || f != 10 || f != 11 || f != 13) { new tmpfieldx[ 64 ]; format(tmpfieldx, 64, "%sBank", teams[f][teamname]); new balancecur = dini_Int(globalstats, tmpfieldx); dini_IntSet(globalstats, tmpfieldx, balancecur+teams[f][teamearn]); format(iStr, sizeof(iStr), "# [%s] Faction earned +$%s into F-BANK from %d Turfs", teams[f][teamname], number_format(teams[f][teamearn]), teams[f][teamturf]); SendClientMessageToTeam(f, iStr, COLOR_PLAYER_VLIGHTBLUE); } teams[f][teamturf] = 0; teams[f][teamearn] = 0; } return 1; }
stop abusing of stocks already, leave "stock" from everything in your script ex: stock GetName > GetName
|