17.01.2015, 09:19
Hi people!
I am having troubles using this new MySQL. I had MySQL R6 and now I want to convert some thing to the newest.
My Business loading isn't working(or something else idk)
So I am asking can you convert it and tell me how to do it in future? Don't post links to wiki, I tried that.
This is how it looks like in R6 and it's working
How to put it in R39-2 ? I tried this...
I am having troubles using this new MySQL. I had MySQL R6 and now I want to convert some thing to the newest.
My Business loading isn't working(or something else idk)
So I am asking can you convert it and tell me how to do it in future? Don't post links to wiki, I tried that.
This is how it looks like in R6 and it's working
Код:
//MySQL R6 OnGameModeInit for (new i = 0; i != MAX_FIRMI; ++i) { UcitajFirmu(i); // Load bizz } // .... //.... // ... // ... //... for(new i = 0; i < sizeof(FirmaInfo); i++) { if(FirmaInfo[i][Tip] == 1) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 19, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Tip] == 2) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 34, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 3) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 52, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 4) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 49, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 5) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 48, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 6) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 10, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 7) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 50, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 8) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 56, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 9) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 40, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 10) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 45, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 11) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 6, COLOR_YELLOW, 0, 0); } else if(FirmaInfo[i][Tip] == 12) { CreateDynamicMapIcon(FirmaInfo[i][fX],FirmaInfo[i][fY],FirmaInfo[i][fZ], 12, COLOR_YELLOW, 0, 0); } } forward UcitajFirmu(idfirme); public UcitajFirmu(idfirme) { new Query[1024]; format(Query,sizeof(Query),"SELECT * FROM `firme` WHERE `ID` = '%d'",idfirme); mysql_query(Query); mysql_store_result(); new result[100]; if(mysql_retrieve_row()) { mysql_fetch_field_row(result,"ID"); FirmaInfo[idfirme][ID] = strval(result); if(FirmaInfo[idfirme][ID] != 0) { mysql_fetch_field_row(result,"ID"); FirmaInfo[idfirme][ID] = strval(result); mysql_fetch_field_row(result,"Ime Vlasnika"); format(FirmaInfo[idfirme][ImeVlasnika],24,"%s",result); mysql_fetch_field_row(result,"Tip"); FirmaInfo[idfirme][Tip] = strval(result); mysql_fetch_field_row(result,"Robe"); FirmaInfo[idfirme][Robe] = strval(result); mysql_fetch_field_row(result,"Roba1"); FirmaInfo[idfirme][Roba1] = strval(result); mysql_fetch_field_row(result,"Roba2"); FirmaInfo[idfirme][Roba2] = strval(result); mysql_fetch_field_row(result,"Roba3"); FirmaInfo[idfirme][Roba3] = strval(result); mysql_fetch_field_row(result,"Roba4"); FirmaInfo[idfirme][Roba4] = strval(result); mysql_fetch_field_row(result,"Roba5"); FirmaInfo[idfirme][Roba5] = strval(result); mysql_fetch_field_row(result,"Roba6"); FirmaInfo[idfirme][Roba6] = strval(result); mysql_fetch_field_row(result,"Roba7"); FirmaInfo[idfirme][Roba7] = strval(result); mysql_fetch_field_row(result,"Roba8"); FirmaInfo[idfirme][Roba8] = strval(result); mysql_fetch_field_row(result,"Roba9"); FirmaInfo[idfirme][Roba9] = strval(result); mysql_fetch_field_row(result,"Roba10"); FirmaInfo[idfirme][Roba10] = strval(result); mysql_fetch_field_row(result,"Roba1C"); FirmaInfo[idfirme][Roba1C] = strval(result); mysql_fetch_field_row(result,"Roba2C"); FirmaInfo[idfirme][Roba2C] = strval(result); mysql_fetch_field_row(result,"Roba3C"); FirmaInfo[idfirme][Roba3C] = strval(result); mysql_fetch_field_row(result,"Roba4C"); FirmaInfo[idfirme][Roba4C] = strval(result); mysql_fetch_field_row(result,"Roba5C"); FirmaInfo[idfirme][Roba5C] = strval(result); mysql_fetch_field_row(result,"Roba6C"); FirmaInfo[idfirme][Roba6C] = strval(result); mysql_fetch_field_row(result,"Roba7C"); FirmaInfo[idfirme][Roba7C] = strval(result); mysql_fetch_field_row(result,"Roba8C"); FirmaInfo[idfirme][Roba8C] = strval(result); mysql_fetch_field_row(result,"Roba9C"); FirmaInfo[idfirme][Roba9C] = strval(result); mysql_fetch_field_row(result,"Roba10C"); FirmaInfo[idfirme][Roba10C] = strval(result); mysql_fetch_field_row(result,"Roba11C"); FirmaInfo[idfirme][Roba11C] = strval(result); mysql_fetch_field_row(result,"Reket"); format(FirmaInfo[idfirme][Reket],24,"%s",result); mysql_fetch_field_row(result,"ReketC"); FirmaInfo[idfirme][ReketC] = strval(result); mysql_fetch_field_row(result,"Novac"); FirmaInfo[idfirme][Novac] = strval(result); mysql_fetch_field_row(result,"Cjena"); FirmaInfo[idfirme][Cijena] = strval(result); if(FirmaInfo[idfirme][Roba1C] == 0) FirmaInfo[idfirme][Roba1C] = 25; if(FirmaInfo[idfirme][Roba2C] == 0) FirmaInfo[idfirme][Roba2C] = 25; if(FirmaInfo[idfirme][Roba3C] == 0) FirmaInfo[idfirme][Roba3C] = 25; if(FirmaInfo[idfirme][Roba4C] == 0) FirmaInfo[idfirme][Roba4C] = 25; if(FirmaInfo[idfirme][Roba5C] == 0) FirmaInfo[idfirme][Roba5C] = 25; if(FirmaInfo[idfirme][Roba6C] == 0) FirmaInfo[idfirme][Roba6C] = 25; if(FirmaInfo[idfirme][Roba7C] == 0) FirmaInfo[idfirme][Roba7C] = 25; if(FirmaInfo[idfirme][Roba8C] == 0) FirmaInfo[idfirme][Roba8C] = 25; if(FirmaInfo[idfirme][Roba9C] == 0) FirmaInfo[idfirme][Roba9C] = 25; if(FirmaInfo[idfirme][Roba10C] == 0) FirmaInfo[idfirme][Roba10C] = 25; if(FirmaInfo[idfirme][Roba11C] == 0) FirmaInfo[idfirme][Roba11C] = 25; mysql_fetch_field_row(result,"X"); FirmaInfo[idfirme][fX] = floatstr(result); mysql_fetch_field_row(result,"Y"); FirmaInfo[idfirme][fY] = floatstr(result); mysql_fetch_field_row(result,"Z"); FirmaInfo[idfirme][fZ] = floatstr(result); mysql_fetch_field_row(result,"Owned"); FirmaInfo[idfirme][Owned] = strval(result); mysql_fetch_field_row(result,"BrojMjesta"); FirmaInfo[idfirme][BrojMjesta] = strval(result); mysql_fetch_field_row(result,"Ime"); format(FirmaInfo[idfirme][Ime],24,"%s",result); mysql_fetch_field_row(result,"INTX"); FirmaInfo[idfirme][INTX] = floatstr(result); mysql_fetch_field_row(result,"INTY"); FirmaInfo[idfirme][INTY] = floatstr(result); mysql_fetch_field_row(result,"INTZ"); FirmaInfo[idfirme][INTZ] = floatstr(result); mysql_fetch_field_row(result,"INTA"); FirmaInfo[idfirme][INTA] = floatstr(result); mysql_fetch_field_row(result,"INTID"); FirmaInfo[idfirme][INTID] = strval(result); mysql_fetch_field_row(result,"Radnik1"); format(FirmaInfo[idfirme][Radnik1],24,"%s",result); mysql_fetch_field_row(result,"Radnik2"); format(FirmaInfo[idfirme][Radnik2],24,"%s",result); mysql_fetch_field_row(result,"Radnik3"); format(FirmaInfo[idfirme][Radnik3],24,"%s",result); mysql_fetch_field_row(result,"Radnik4"); format(FirmaInfo[idfirme][Radnik4],24,"%s",result); mysql_fetch_field_row(result,"Radnik5"); format(FirmaInfo[idfirme][Radnik5],24,"%s",result); mysql_fetch_field_row(result,"Radnik6"); format(FirmaInfo[idfirme][Radnik6],24,"%s",result); mysql_fetch_field_row(result,"Radnik7"); format(FirmaInfo[idfirme][Radnik7],24,"%s",result); mysql_fetch_field_row(result,"Radnik8"); format(FirmaInfo[idfirme][Radnik8],24,"%s",result); mysql_fetch_field_row(result,"Radnik9"); format(FirmaInfo[idfirme][Radnik9],24,"%s",result); mysql_fetch_field_row(result,"Radnik10"); format(FirmaInfo[idfirme][Radnik10],24,"%s",result); mysql_fetch_field_row(result,"Radnik11"); format(FirmaInfo[idfirme][Radnik11],24,"%s",result); mysql_fetch_field_row(result,"Radnik12"); format(FirmaInfo[idfirme][Radnik12],24,"%s",result); SpawnanihFirmi++; } FirmaInfo[idfirme][BrojMjesta] = 12; if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik1], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik2], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik3], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik4], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik5], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik6], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik7], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik8], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik9], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik10], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik11], true)) { FirmaInfo[idfirme][BrojMjesta]--; } if(!strcmp("Nitko", FirmaInfo[idfirme][Radnik12], true)) { FirmaInfo[idfirme][BrojMjesta]--; } format(Query,sizeof(Query),"UPDATE `firme` SET `BrojMjesta`='%d' WHERE `ID`='%d'",FirmaInfo[idfirme][BrojMjesta],idfirme); mysql_query(Query); } if(FirmaInfo[idfirme][Owned] != 0) { format(Query,sizeof(Query),"SELECT * FROM `racuni` WHERE `Firma1` = '%d'",idfirme); mysql_query(Query); mysql_store_result(); if(mysql_retrieve_row()) { } else { format(Query,sizeof(Query),"UPDATE `firme` SET `Owned`='0' WHERE `ID`='%d'",idfirme); mysql_query(Query); FirmaInfo[idfirme][Owned] = 0; } } ReloadFLabels(idfirme); return 1; }
Код:
// R29-2 OnGameModeInit new query[512]; mysql_format(MySQLHandle, query, sizeof(query), "SELECT * FROM `firme` WHERE `ImeVlasnika` != 'Obrisano' LIMIT 0,"#MAX_FIRMI); mysql_tquery(MySQLHandle, query, "UcitajFirmu", ""); forward UcitajFirmu(); public UcitajFirmu() { new Query[ 1024 ], rows, fields ; cache_get_data(rows, fields, MySQLHandle); if(cache_num_rows() != 0) { for(new i = 0; i != cache_get_row_count(); i++) { FirmaInfo[i][IDFirme] = i; cache_get_field_content(i,"ImeVlasnika",FirmaInfo[i][ImeVlasnika],MySQLHandle,25); FirmaInfo[i][Vrsta] = cache_get_field_content_int(i, "Vrsta"); cache_get_field_content(i,"ImeFirme",FirmaInfo[i][ImeFirme],MySQLHandle,40); FirmaInfo[i][SkinCijena1] = cache_get_field_content_int(i, "SkinCijena1"); FirmaInfo[i][SkinCijena2] = cache_get_field_content_int(i, "SkinCijena2"); FirmaInfo[i][SkinCijena3] = cache_get_field_content_int(i, "SkinCijena3"); FirmaInfo[i][SkinCijena4] = cache_get_field_content_int(i, "SkinCijena4"); FirmaInfo[i][SkinCijena5] = cache_get_field_content_int(i, "SkinCijena5"); FirmaInfo[i][SkinCijena6] = cache_get_field_content_int(i, "SkinCijena6"); FirmaInfo[i][SkinCijena7] = cache_get_field_content_int(i, "SkinCijena7"); FirmaInfo[i][SkinCijena8] = cache_get_field_content_int(i, "SkinCijena8"); FirmaInfo[i][SkinCijena9] = cache_get_field_content_int(i, "SkinCijena9"); FirmaInfo[i][SkinCijena10] = cache_get_field_content_int(i, "SkinCijena10"); FirmaInfo[i][SkinKolicina1] = cache_get_field_content_int(i, "SkinKolicina1"); FirmaInfo[i][SkinKolicina2] = cache_get_field_content_int(i, "SkinKolicina2"); FirmaInfo[i][SkinKolicina3] = cache_get_field_content_int(i, "SkinKolicina3"); FirmaInfo[i][SkinKolicina4] = cache_get_field_content_int(i, "SkinKolicina4"); FirmaInfo[i][SkinKolicina5] = cache_get_field_content_int(i, "SkinKolicina5"); FirmaInfo[i][SkinKolicina6] = cache_get_field_content_int(i, "SkinKolicina6"); FirmaInfo[i][SkinKolicina7] = cache_get_field_content_int(i, "SkinKolicina7"); FirmaInfo[i][SkinKolicina8] = cache_get_field_content_int(i, "SkinKolicina8"); FirmaInfo[i][SkinKolicina9] = cache_get_field_content_int(i, "SkinKolicina9"); FirmaInfo[i][SkinKolicina10] = cache_get_field_content_int(i, "SkinKolicina10"); FirmaInfo[i][ArtiklCijena1] = cache_get_field_content_int(i, "ArtiklCijena1"); FirmaInfo[i][ArtiklCijena2] = cache_get_field_content_int(i, "ArtiklCijena2"); FirmaInfo[i][ArtiklCijena3] = cache_get_field_content_int(i, "ArtiklCijena3"); FirmaInfo[i][ArtiklCijena4] = cache_get_field_content_int(i, "ArtiklCijena4"); FirmaInfo[i][ArtiklCijena5] = cache_get_field_content_int(i, "ArtiklCijena5"); FirmaInfo[i][ArtiklCijena6] = cache_get_field_content_int(i, "ArtiklCijena6"); FirmaInfo[i][ArtiklCijena7] = cache_get_field_content_int(i, "ArtiklCijena7"); FirmaInfo[i][ArtiklCijena8] = cache_get_field_content_int(i, "ArtiklCijena8"); FirmaInfo[i][ArtiklCijena9] = cache_get_field_content_int(i, "ArtiklCijena9"); FirmaInfo[i][ArtiklCijena10] = cache_get_field_content_int(i, "ArtiklCijena10"); FirmaInfo[i][ArtiklKolicina1] = cache_get_field_content_int(i, "ArtiklKolicina1"); FirmaInfo[i][ArtiklKolicina2] = cache_get_field_content_int(i, "ArtiklKolicina2"); FirmaInfo[i][ArtiklKolicina3] = cache_get_field_content_int(i, "ArtiklKolicina3"); FirmaInfo[i][ArtiklKolicina4] = cache_get_field_content_int(i, "ArtiklKolicina4"); FirmaInfo[i][ArtiklKolicina5] = cache_get_field_content_int(i, "ArtiklKolicina5"); FirmaInfo[i][ArtiklKolicina6] = cache_get_field_content_int(i, "ArtiklKolicina6"); FirmaInfo[i][ArtiklKolicina7] = cache_get_field_content_int(i, "ArtiklKolicina7"); FirmaInfo[i][ArtiklKolicina8] = cache_get_field_content_int(i, "ArtiklKolicina8"); FirmaInfo[i][ArtiklKolicina9] = cache_get_field_content_int(i, "ArtiklKolicina9"); FirmaInfo[i][ArtiklKolicina10] = cache_get_field_content_int(i, "ArtiklKolicina10"); FirmaInfo[i][RentVozilaCijena1] = cache_get_field_content_int(i, "RentVozilaCijena1"); FirmaInfo[i][RentVozilaCijena2] = cache_get_field_content_int(i, "RentVozilaCijena2"); FirmaInfo[i][RentVozilaCijena3] = cache_get_field_content_int(i, "RentVozilaCijena3"); FirmaInfo[i][RentVozilaCijena4] = cache_get_field_content_int(i, "RentVozilaCijena4"); FirmaInfo[i][RentVozilaCijena5] = cache_get_field_content_int(i, "RentVozilaCijena5"); FirmaInfo[i][RentVozilaCijena6] = cache_get_field_content_int(i, "RentVozilaCijena6"); FirmaInfo[i][RentVozilaCijena7] = cache_get_field_content_int(i, "RentVozilaCijena7"); FirmaInfo[i][RentVozilaCijena8] = cache_get_field_content_int(i, "RentVozilaCijena8"); FirmaInfo[i][RentVozilaCijena9] = cache_get_field_content_int(i, "RentVozilaCijena9"); FirmaInfo[i][RentVozilaCijena10] = cache_get_field_content_int(i, "RentVozilaCijena10"); FirmaInfo[i][OdrzavanjeRentVozila] = cache_get_field_content_int(i, "OdrzavanjeRentVozila"); FirmaInfo[i][CijenaGorivaNaPumpi] = cache_get_field_content_int(i, "CijenaGorivaNaPumpi"); FirmaInfo[i][KolicinaGorivaNaPumpi] = cache_get_field_content_int(i, "KolicinaGorivaNaPumpi"); FirmaInfo[i][NovacUFirmi] = cache_get_field_content_int(i, "NovacUFirmi"); FirmaInfo[i][Zakljucano] = cache_get_field_content_int(i, "Zakljucano"); FirmaInfo[i][GlavnaPlacaRadnika] = cache_get_field_content_int(i, "GlavnaPlacaRadnika"); FirmaInfo[i][VoziloZaRobu] = cache_get_field_content_int(i, "VoziloZaRobu"); FirmaInfo[i][JobZaposlenika] = cache_get_field_content_int(i, "JobZaposlenika"); cache_get_field_content(i,"Zaposlenik1",FirmaInfo[i][Zaposlenik1],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik2",FirmaInfo[i][Zaposlenik2],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik3",FirmaInfo[i][Zaposlenik3],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik4",FirmaInfo[i][Zaposlenik4],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik5",FirmaInfo[i][Zaposlenik5],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik6",FirmaInfo[i][Zaposlenik6],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik7",FirmaInfo[i][Zaposlenik7],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik8",FirmaInfo[i][Zaposlenik8],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik9",FirmaInfo[i][Zaposlenik9],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik10",FirmaInfo[i][Zaposlenik10],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik11",FirmaInfo[i][Zaposlenik11],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik12",FirmaInfo[i][Zaposlenik12],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik13",FirmaInfo[i][Zaposlenik13],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik14",FirmaInfo[i][Zaposlenik14],MySQLHandle,25); cache_get_field_content(i,"Zaposlenik15",FirmaInfo[i][Zaposlenik15],MySQLHandle,25); FirmaInfo[i][Cijena] = cache_get_field_content_int(i, "Cijena"); FirmaInfo[i][Owned] = cache_get_field_content_int(i, "Owned"); FirmaInfo[i][EXTX] = cache_get_field_content_float(i, "EXTX"); FirmaInfo[i][EXTY] = cache_get_field_content_float(i, "EXTY"); FirmaInfo[i][EXTZ] = cache_get_field_content_float(i, "EXTZ"); FirmaInfo[i][EXTA] = cache_get_field_content_float(i, "EXTA"); FirmaInfo[i][INTX] = cache_get_field_content_float(i, "INTX"); FirmaInfo[i][INTY] = cache_get_field_content_float(i, "INTY"); FirmaInfo[i][INTZ] = cache_get_field_content_float(i, "INTZ"); FirmaInfo[i][INTA] = cache_get_field_content_float(i, "INTA"); FirmaInfo[i][INTID] = cache_get_field_content_int(i, "INTID"); FirmaInfo[i][VirtualWorldID] = cache_get_field_content_int(i, "VirtualWorldID"); FirmaInfo[i][SkladisteRoba] = cache_get_field_content_int(i, "SkladisteRoba"); ReloadFirmaLabels(i); SpawnanihFirmi++; FirmaInfo[i][JobZaposlenika] = 15; if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik1], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik2], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik3], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik4], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik5], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik6], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik7], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik8], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik9], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik10], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik11], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik12], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik13], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik14], true)) { FirmaInfo[i][JobZaposlenika]--; } if(!strcmp("Nitko", FirmaInfo[i][Zaposlenik15], true)) { FirmaInfo[i][JobZaposlenika]--; } mysql_format(MySQLHandle, Query, sizeof(Query),"UPDATE `firme` SET `JobZaposlenika`='%d' WHERE `IDFirme`='%d'",FirmaInfo[i][JobZaposlenika],i); mysql_tquery(MySQLHandle, Query, "", ""); if(FirmaInfo[i][Vrsta] == 1) // benzinska pumpa { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 55, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 2) // rent vozila { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 34, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 3) // job firma { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 52, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 4) // kafic { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 49, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 5) // klub { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 48, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 6) // Burger { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 10, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 7) // restoran { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 50, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 8) // trgovina { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 56, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 10) // trgovina odjece { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 45, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 11) //gun shop { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 6, COLOR_YELLOW, 0, 0, -1, 500); } else if(FirmaInfo[i][Vrsta] == 12) // electro shop { CreateDynamicMapIcon(FirmaInfo[i][EXTX],FirmaInfo[i][EXTY],FirmaInfo[i][EXTZ], 47, COLOR_YELLOW, 0, 0, -1, 500); } } } return 1; }