07.01.2015, 19:26
So when i create house level of it should be 4 as it is defined in variable
But when created, on label level is 109 and i have no idea why, here is the code.
And image:
pawn Код:
HInfo[id][Level] = 4;
pawn Код:
new string[2500];
new id = SpawnedHouses+1;
new vw = random(2000);
new Float:ulazx, Float:ulazy, Float:ulazz, Float:ulaza;
GetPlayerPos(playerid, ulazx, ulazy, ulazz);
GetPlayerFacingAngle(playerid, ulaza);
format(string, sizeof(string), "INSERT INTO `kuce` (`ID`, `ImaVlasnika`, `Vlasnik`, `Vrsta`, `UlazX`, `UlazY`, `UlazZ`, `UlazA`, \
`IzlazX`, `IzlazY`, `IzlazZ`, `IzlazA`, `DostupanRent`, `RentCena`, `Droga`, `Mats`, `Zakljucano`, `Cena`, `Adresa`, `VW`, `Interior`, `kLevel`) VALUES");
format(string, sizeof(string), "%s ('%d', '0', 'Niko', 'Mala Kuca', '%f', '%f', '%f', '%f', '2333.1892089844', '-1076.9910888672', '1049.0234375', '0.0000', '0', '-1', '0', '0', '0', '25000', 'Commerce %d', '%d', '6', '4')", string, id, ulazx, ulazy, ulazz, ulaza, id, vw);
mysql_function_query(konekt, string, true, "OnQueryFinish", "i", THREAD_OSTALO);
HInfo[id][kID] = id; HInfo[id][ImaVlasnika] = 0; HInfo[id][Vlasnik] = 0;
HInfo[id][UlazX] = ulazx; HInfo[id][UlazY] = ulazy; HInfo[id][UlazZ] = ulazz; HInfo[id][UlazA] = ulaza;
HInfo[id][IzlazX] = 2333.1892089844; HInfo[id][IzlazY] = -1076.9910888672; HInfo[id][IzlazZ] = 1049.0234375; HInfo[id][IzlazA] = 0.0000;
HInfo[id][DostupanRent] = 0; HInfo[id][RentCena] = -1; HInfo[id][Droga] = 0; HInfo[id][Mats] = 0; HInfo[id][Zakljucano] = 0;
HInfo[id][Cena] = 25000; HInfo[id][VW] = vw; HInfo[id][Interior] = 6; HInfo[id][Level] = 4;
strmid(HInfo[id][Vrsta], "Mala Kuca", 0, strlen("Mala Kuca"),255);
format(HInfo[id][Adresa],32,"Commerce %d",id);
SCMF(playerid, WHITE, "Kuca ID %d je uspesno kreirana.", id);
SpawnedHouses++;
format(str, sizeof(str), "Kuca na prodaju\nVrsta: %s\nCena: $%d\nLevel: %d\nAdresa: %s", HInfo[hID][Vrsta], HInfo[hID][Cena], HInfo[hID][Level], HInfo[hID][Adresa]);
KucaLabel[hID] = Create3DTextLabel(str ,0x00FF00AA, HInfo[hID][UlazX], HInfo[hID][UlazY], HInfo[hID][UlazZ], 10, 0, 1);