05.11.2014, 13:48
Hello, now i making car system, but now, when i wanna to load a car, which are in DB(DataBase), not loading, i am loading on 'OnGamemodeInit' callback, i try'ed to make loading on command, jus nothing happens, there go, code -
Код HTML:
stock LoadPriVeh() { new Query[1024], ID, Modeliukas, Owners, Spalvos1, Spalvos2, Pos[4], Nusipirkau; format(Query, sizeof(Query), "SELECT * FROM `automobiliai` WHERE 'ID'"); mysql_store_result(); if(mysql_num_rows() > 0) { while(mysql_fetch_row(Query)) { MasinosI[ID][Modelis] = Modeliukas; MasinosI[ID][Savininkass] = Owners; MasinosI[ID][Spalva1] = Spalvos1; MasinosI[ID][Spalva2] = Spalvos2; MasinosI[ID][x] = Pos[0]; MasinosI[ID][y] = Pos[1]; MasinosI[ID][z] = Pos[2]; MasinosI[ID][a] = Pos[3]; MasinosI[ID][Perkama] = Nusipirkau; new Masinukas = CreateVehicle(Modeliukas, Pos[0], Pos[1], Pos[2], Pos[3], Spalvos1, Spalvos2, 500000); SetVehicleNumberPlate(Masinukas, "Cbb"); } } return 1; }