Best-Killer Posted November 5, 2016 Posted November 5, 2016 addEvent( 'CreateMarker', true ) addEventHandler( 'CreateMarker', root, function( role, name, X, Y, Z, r, g, b, v, rot) local AllMarker = exports.NGSQL:db_query( "SELECT * FROM vehicle_marker" ) id = #AllMarker + 1 exports.NGSQL:db_exec( "INSERT INTO vehicle_marker ( Role, Name, posX, posY, posZ, r, g, b, Vehicles, Rotation, ID ) VALUES ( "..role..", "..name..", "..X..", "..Y..", "..Z..", "..r..", "..g..", "..b..", '..v..', '..rot..', "..id..")" ) local marker = createMarker( X, Y, Z, 'cylinder', 1.25, r, g, b, 255 ) setElementData( marker, 'giveCarSystem', true ) setElementData( marker, 'id', id ) outputChatBox( "Marker Was Created", source, 255, 255, 0 ) end ) addEventHandler("onClientGUIClick",root, function () local name = guiGetText(GUIEditor.edit[7]) local role = guiGetText(GUIEditor.edit[1]) local x,y,z = getElementPosition (getLocalPlayer()) local r, g, b = getColorFromString ( guiGetText (GUIEditor.edit[6] )) local coloredit = guiGetText (GUIEditor.edit[6]) local rot = getPlayerRotation (getLocalPlayer()) local v = guiGridListGetItemText ( GUIEditor.gridlist[2], 1, 1) if ( source == GUIEditor.button[6] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif ( source == GUIEditor.button[5] ) then guiSetText (GUIEditor.edit[2], x ) guiSetText (GUIEditor.edit[3], y ) guiSetText (GUIEditor.edit[4], z ) guiSetText (GUIEditor.edit[5], rot ) guiGetText (GUIEditor.edit[6],{r,g,b}) elseif ( source == GUIEditor.button[2] ) then currentPosition = {role,name,x,y,z,r,g,b,v,rot} if #currentPosition == 0 then return end local send = { [1] = currentPosition[1], [2] = currentPosition[2], [3] = currentPosition[3], [4] = currentPosition[4], [5] = currentPosition[5], [6] = currentPosition[6], [7] = currentPosition[7], [8] = currentPosition[8], [9] = currentPosition[9], [10] = currentPosition[10] } newPos = {} triggerServerEvent("CreateMarker", localPlayer, unpack(send)) elseif ( source == GUIEditor.button[1] ) then -----Create Marker--- elseif ( source == GUIEditor.button [3] ) then -----Remove Vehicle----- guiGridListRemoveRow(GUIEditor.gridlist[2], guiGridListGetSelectedItem(GUIEditor.gridlist[2])) elseif ( source == GUIEditor.button [4] ) then -----Add vehicle ------- local vehicletext = guiComboBoxGetSelected(GUIEditor.combobox[1]) local vehicle = guiComboBoxGetItemText(GUIEditor.combobox[1], vehicletext) local vehicleid = getVehicleModelFromName(vehicle) local row = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2],row, model,vehicleid,false,false) end end) dbExec failed; (1054) unknown column 'Job' in 'field list'
01010011 Posted November 5, 2016 Posted November 5, 2016 That's because the SQL Structure of the table doesn't have any "Job" column. Make sure it exists.
AJXB Posted November 5, 2016 Posted November 5, 2016 Someone is trying to clone my resource, huh ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
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