Jump to content


  • Posts

  • Joined

  • Last visited

DatPsychopath's Achievements


Vic (3/54)



  1. I tried it and it works exactly as it should. Thank you so much for your help!
  2. I apologize for the late reply. The database was created so that a friend sent me an empty database structure, which he used on the server and worked for him. CREATE TABLE IF NOT EXISTS `vehicles_shop` ( `id` int(11) NOT NULL AUTO_INCREMENT, `vehmtamodel` int(11) DEFAULT '0', `vehbrand` text COLLATE utf8_czech_ci, `vehmodel` text COLLATE utf8_czech_ci, `vehyear` int(11) DEFAULT '2014', `vehprice` int(11) DEFAULT '0', `vehtax` int(11) DEFAULT '0', `createdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `createdby` int(11) NOT NULL DEFAULT '0', `updatedate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updatedby` int(11) NOT NULL DEFAULT '0', `notes` text COLLATE utf8_czech_ci, `handling` varchar(1000) COLLATE utf8_czech_ci DEFAULT NULL, `duration` int(11) NOT NULL DEFAULT '1000', `enabled` int(1) NOT NULL DEFAULT '0', `spawnto` tinyint(2) NOT NULL DEFAULT '0', `doortype` tinyint(4) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;
  3. Part of the script: if not data.update then local mQuery1 = mysql:query_insert_free("INSERT INTO vehicles_shop SET vehmtamodel='"..toSQL(data["mtaModel"]).."', vehbrand='"..toSQL(data["brand"]).."', vehmodel='"..toSQL(data["model"]).."', vehyear='"..toSQL(data["year"]).."', vehprice='"..toSQL(data["price"]).."', vehtax='"..toSQL(data["tax"]).."', createdby='"..toSQL(getElementData(client, "account:id")).."', notes='"..toSQL(data["note"]).."', enabled='"..toSQL(enabled).."', `spawnto`='"..toSQL(data["spawnto"]).."', `doortype` = " .. data.doortype) if not mQuery1 then outputDebugString("VEHICLE MANAGER / VEHICLE LIB / createVehicleRecord / DATABASE ERROR") outputChatBox("[VEHICLE MANAGER] Failed to create new vehicle #"..mQuery1.." in library.", client, 255,0,0) return false end Text displayed in the console: [18:10:55] INFO: MYSQL ERROR 1292: Incorrect datetime value: '0000-00-00 00:00:00' for column 'updatedate' at row 1 [18:10:55] INFO: VEHICLE MANAGER / VEHICLE LIB / createVehicleRecord / DATABASE ERROR [18:10:55] ERROR: vehicle-library\s_vehicle_library.lua:127: attempt to concatenate local 'mQuery1' (a boolean value) Does anyone know how to solve this problem? Whenever I try to create the vehicle, nothing happens and it shows this error.
  4. Thank you very much! It works exactly as I needed it. Problem solved, so the post can be locked.
  5. First of all, I would like to thank you very much for your help. Well.. can script look like this? function speedchime() if getElementSpeed(vehicle, 1) >= 100 then playSound("speedchime.mp3"); end addEventHandler("onClientResourceStart", getResourceRootElement(), speedchime) And meta look like this? <meta> <script src="client.lua" type="client"/> <file src="speedchime.mp3" /> </meta>
  6. Hello! I apologize for my bad English. I'm trying to write a script that will do that if I drive more than 100km/h in the vehicle (vehicle model - 560 (Sultan)), it will start playing speed chime (as in the old Toyota Corolla - click here), but if I drive less than 100km/h, this sound will not play. Unfortunately, I have no idea how to do something like that. Could someone please help me? If yes, I will be very grateful!
  • Create New...