ΞĪŚŚÀ Posted February 28, 2014 Share Posted February 28, 2014 السلام عليكم شباب ضبطت ماركر سيارات بس فيه مشيكلة انه اذا جيت على الماركر ماتجي اللوحة >< Client Side********* ------------------------------------------------------------------------------------------------------------------------------- GUIEditor = { gridlist = {}, window = {}, button = {}, label = {} } cars = { {576}, {603}, {571}, {533}, {603}, {510}, {510}, {554}, {549}, {471}, } GUIEditor.window[1] = guiCreateWindow(621, 200, 227, 319, "Cars System By A-L-I", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(1, 17, 425, 208, "", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(10, 7, 206, 195, false, GUIEditor.label[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Cars", 0.9) GUIEditor.button[1] = guiCreateButton(9, 233, 201, 30, "اخذ", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(9, 278, 201, 30, "اغلاق", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(1, 309, 225, 58, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(-1, -47, 233, 15, "", false, GUIEditor.label[2]) GUIEditor.label[4] = guiCreateLabel(3, 264, 223, 14, "", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(208, 222, 18, 177, "", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(-5, 229, 18, 177, "", false, GUIEditor.window[1]) end ) for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, i.."- - - - - - -", false, true) guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, carName, false, true) guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 15, 70, 90, 210) end addEvent ("openMean", true) function openMean () if (getLocalPlayer() == source) then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end addEventHandler ("openMean", getRootElement(), openMean) addEvent ("closeOpenMean", true) function closeOpenMean () if (getLocalPlayer() == source) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("closeOpenMean", getRootElement(), closeOpenMean) addEventHandler ("onClientGUIClick", GUIEditor.button[2], function (button, state, absoluteX, absoluteYe) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end) function trigger () if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) then local car = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 2) if car == "" or car == nil then outputChatBox( "يرجى اختــــــــيــار مركبة",225,299,20,true ) return end triggerServerEvent ("getCar", getLocalPlayer(), car) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", GUIEditor.button[1], function (button, state, absoluteX, absoluteYe) trigger(getLocalPlayer()) end) addEventHandler ("onClientGUIDoubleClick", GUIEditor.gridlist[1], function (button, state, absoluteX, absoluteYe) trigger(getLocalPlayer()) end) Link to comment
#DRAGON!FIRE Posted February 28, 2014 Share Posted February 28, 2014 مسوي هريسة انت ؟ الكود كله غلط .. بعدين وين الماركر ما اشوفه .. > وين الحدث ؟ Link to comment
ΞĪŚŚÀ Posted February 28, 2014 Author Share Posted February 28, 2014 markers = { {1732.6292724609,-1278.9702148438,12.574156761169}, {1975.0847167969,-1277.7426757813,22.8203125}, {2421.4755859375,842.52813720703,6.703125}, --{ x, y, z }, } for i,v in ipairs (markers) do marker = createMarker(v[1], v[2], v[3], "cylinder", get("markerSize"), get("markerColorR"), get("markerColorG"), get("markerColorB"), get("markerAlpha")) end veh = {} addEvent ("getCar", true) addEventHandler ("getCar", getRootElement(), function(car) if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local carID = getVehicleModelFromName (car) local x,y,z = getElementPosition(source) local carName = getVehicleNameFromModel (carID) veh[source] = createVehicle(carID, x,y,z) setVehicleColor(veh[source], 190, 135, 199) warpPedIntoVehicle(source, veh[source]) end ) addEventHandler ( "onPlayerQuit", getRootElement(), function () if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end end) function markerHit (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then return end if getElementType(hitPlayer) == "player" then triggerClientEvent ("openMean", hitPlayer) end end addEventHandler ("onMarkerHit", resourceRoot, markerHit) function markerLeave (hitPlayer, matchingDimension) if getElementType(hitPlayer) == "player" then triggerClientEvent ("closeOpenMean", hitPlayer) end end addEventHandler ("onMarkerLeave", resourceRoot, markerLeave) Link to comment
ΞĪŚŚÀ Posted March 5, 2014 Author Share Posted March 5, 2014 اخي لو تسوي هريسه يكون افضل الكود شغال خخ بس غلط بالوحة , يأـ جامر انتححر , شوف لك صرفة روح لأي برج وانا بدفع فلوس وانتحر ,, 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