Zafire Posted December 29, 2010 Share Posted December 29, 2010 I make this script and works it load vehicles put te correct color all, the unique problem is the script dont lock or unlock the cars or turn engine off on.. when i enter in any car it is not locked and the engine is turn on!.. maybe can you help me? function cargarVehiculos() local vehnum = 0 local resultado = mysql_query(sql_connect, "SELECT * FROM vehiculos ORDER BY id ASC") if(resultado) then while true do local row = mysql_fetch_assoc(resultado) if(not row) then break end local vehiculo = createVehicle(row["modelo"], row["x"], row["y"], row["z"]) setVehicleColor(vehiculo, row["color1"], row["color2"], row["color1"], row["color2"]) if(row["encendido"] == 1) then setVehicleEngineState(vehiculo, true) else setVehicleEngineState(vehiculo, false) end if(row["cerrado"] == 1) then setVehicleLocked(vehiculo, true) else setVehicleLocked(vehiculo, false) end vehnum = vehnum + 1 end end return vehnum end Thanks Link to comment
Neukfout Posted December 29, 2010 Share Posted December 29, 2010 https://community.multitheftauto.com/ind ... ils&id=131 Just use the resource for that 1 Link to comment
Zafire Posted December 29, 2010 Author Share Posted December 29, 2010 thxx for that but i want someone xplain me why the car dont lock, because i want to create my own script and leanr Link to comment
Aibo Posted December 29, 2010 Share Posted December 29, 2010 check you SQL data types maybe Link to comment
Zafire Posted December 29, 2010 Author Share Posted December 29, 2010 sql type is INT in cerrado(locked) in encendido too.. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now