28.06.2014, 19:04
hi guys, i have command to insert new house to table:
And there is no errors in mysql log, and here is 1 another command to create apartment:
and afther restart of server apartment is loaded and house is not loaded cuz its not imported to table
pawn Код:
new szQuery[2048],Float:ulazx, Float:ulazy, Float:ulazz, Float:ulaza;
GetPlayerPos(playerid, ulazx, ulazy, ulazz);
GetPlayerFacingAngle(playerid, ulaza);
format(szQuery, sizeof(szQuery),"INSERT INTO `Kuce` (`ID`, `ImaVlasnika`, `Vlasnik`, `Vrsta`, `UlazX`, `UlazY`, `UlazZ`, `UlazA`, `IzlazX`, `IzlazY`, `IzlazZ`, `IzlazA`, `HCX`, `HCY`, `HCZ`, `HCA`, `BrojSoba`, `DostupnoZaRent`, \
`RentCena`, `hDroga`, `Oruzje1`, `Municija1`, `Oruzje2`, `Municija2`, `Oruzje3`, `Municija3`,");
format(szQuery, sizeof(szQuery),"%s `Torba`, `Droga`, `Pizza`, `Sok`, `Hotdog`, `Zice`, `Kanister`, `Semena`, \
`Koka`, `GDOruzje`, `GDProdaja`, `GPS`, `Uze`, `HCModel`, `HCBoja1`, `HCBoja2`, `Zakljucano`, `Cena`, `Enterijer`, `Adresa`, `VW`, `kNivo`, `Heal`, `HouseCar`, `HouseCarLock`, `HCVCena`, `Sef`, `Alarm`, `Usao`) VALUES", szQuery);
format(szQuery, sizeof(szQuery),"%s ('%d', '0', 'Niko', 'Mala kuca', '%f', '%f', '%f', '%f', '2333.1892089844', '-1076.9910888672', '1049.0234375', '0', '9999', '9999', '0', '0', '8', '0', '-1', '0', '-1', '-1', '-1', '-1', '-1', '-1',",szQuery,id, ulazx, ulazy, ulazz, ulaza);
format(szQuery, sizeof(szQuery),"%s '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '-1', '-1', '-1', '1', '155000', '6', 'Zagreb %d', '%d', '12', '0', '0', '0', '200000', '0', '0', '0')", szQuery, id, vw);
sql_query(mysql, szQuery);
format(CmdString, sizeof(CmdString), "Mala kuca osobine 1 u Zagrebu, ID: %d | Uspesno Postavljena!", id);
SCM(playerid, PLAVA, CmdString);
SpawnedKuca++;
return 1;
}
pawn Код:
new vw = random(2011100);
new Float:ulazx, Float:ulazy, Float:ulazz, Float:ulaza;
GetPlayerPos(playerid, ulazx, ulazy, ulazz);
GetPlayerFacingAngle(playerid, ulaza);
new szQuery[1024];
format(szQuery,sizeof(szQuery),"INSERT INTO `Stanovi` (`ID`, `ImaVlasnika`, `Vlasnik`, `UlazX`, `UlazY`, `UlazZ`, `UlazA`, `IzlazX`, `IzlazY`, `IzlazZ`, `IzlazA`, `Zakljucano`, `Cena`, `Enterijer`, `Adresa`, `VW`, `Nivo`, `Usao`) VALUES ('%d', '0', 'Niko', '%f', '%f', '%f', '%f', '223.04', '1287.26', '1081.9', '1081.9', '0', '75000', '1', 'Commerce %d', '%d', '5', '0')",id, ulazx, ulazy, ulazz, ulaza,id,vw);
sql_query(mysql, szQuery);
format(CmdString, sizeof(CmdString), "Stan ID: %d | Uspjesno Postavljen!", id);
SCM(playerid, PLAVA, CmdString);
SpawnedStan++;