bl4ckhatx
Developer
Hello, this sql request (normally is work manuel phpmyadmin) is add table on player_vehicles.
What want to, I use QB-PoliceJob the police garages is not save of SQL DB, this code basicly usage click to spawn. Want to save because maybe some Pd player is like the customize the car or upgrade the vehicle on benny's mechanic ( only police job ).
I try it 3 Methods thats;
<hr>
Sorry My English!
What want to, I use QB-PoliceJob the police garages is not save of SQL DB, this code basicly usage click to spawn. Want to save because maybe some Pd player is like the customize the car or upgrade the vehicle on benny's mechanic ( only police job ).
I try it 3 Methods thats;
<hr>
MySQL.Async.execute("INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, state) VALUES (@license,@citizenid,@vehicle,@hash,@mods,@plate,@state)", {['@license'] = Player.PlayerData.license, ['@citizenid'] = Player.PlayerData.citizenid, ['@vehicle'] = vehmodel, ['@hash'] = hash, ['@mods'] = "{}", ['@plate'] = newplate, ['@state'] = "0"})QBCore.Functions.ExecuteSql(false, "INSERT INTO `player_vehicles` (`id`, `license`, `citizenid`, `vehicle`, `hash`, `mods`, `plate`, `fakeplate`, `garage`, `fuel`, `engine`, `body`, `state`, `depotprice`, `drivingdistance`, `status`, `balance`, `paymentamount`, `paymentsleft`, `financetime`, `modifications`, `posX`, `posY`, `posZ`, `rotX`, `rotY`, `rotZ`, `lastUpdate`) VALUES (NULL, Player.PlayerData.license, Player.PlayerData.citizenid, vehmodel, hash, '{}', newplate, NULL, NULL, '100', '1000', '1000', '0', '0', NULL, NULL, '0', '0', '0', '0', '', '', '', '', '', '', '', '0')")
exports.oxmysql:insert("INSERT INTO `player_vehicles` (`id`, `license`, `citizenid`, `vehicle`, `hash`, `mods`, `plate`, `fakeplate`, `garage`, `fuel`, `engine`, `body`, `state`, `depotprice`, `drivingdistance`, `status`, `balance`, `paymentamount`, `paymentsleft`, `financetime`, `modifications`, `posX`, `posY`, `posZ`, `rotX`, `rotY`, `rotZ`, `lastUpdate`) VALUES (NULL, Player.PlayerData.license, Player.PlayerData.citizenid, vehmodel, hash, '{}', newplate, NULL, NULL, '100', '1000', '1000', '0', '0', NULL, NULL, '0', '0', '0', '0', '', '', '', '', '', '', '', '0')")
Sorry My English!
Last edited: