Nickelz Posted July 12, 2013 Share Posted July 12, 2013 السلآآم عليكم ورححمة الله وبركاتتهه شباب تكفؤون فكوني من هـ المشكلة ابي اعرف كيف استخدم الجريد لست, وربي تطففششش هذا كودي vehiclew = guiCreateWindow(781, 0, 324, 492, "Vehicles Panel", false) guiWindowSetSizable(vehiclew, false) guiSetVisible(vehiclew, false) vehicleL= guiCreateLabel(35, 51, 170, 34, "Pick your Vehicle:", false, vehiclew) vehicleG= guiCreateGridList(25, 69, 280, 342, false, vehiclew) vehC = guiGridListAddColumn(vehicleG, "Vehicle name", 0.9) for i = 1, 2 do vehrow = guiGridListAddRow(vehicleG) end guiGridListSetItemText(vehicleG, 0, 1, "Boxville", false, false) guiGridListSetItemText(vehicleG, 1, 1, "", false, false) vehicleb1 = guiCreateButton(29, 436, 105, 46, "Spawn vehicle", false, vehiclew) vehicleb2 = guiCreateButton(201, 436, 105, 46, "Cancel", false, vehiclew) ابيه يتحقق اذا اي خيار, ويعطيني سيارة Link to comment
jafar Posted July 12, 2013 Share Posted July 12, 2013 guiGridListGetSelectedItem guiGridListGetItemText Link to comment
Nickelz Posted July 12, 2013 Author Share Posted July 12, 2013 يَ شييخ حاولت, اخترعت كودات, حسيت اني اول مرة اشوف كودات Link to comment
jafar Posted July 12, 2013 Share Posted July 12, 2013 (edited) -- Client Side ! vehiclew = guiCreateWindow(781, 0, 324, 492, "Vehicles Panel", false) guiWindowSetSizable(vehiclew, false) guiSetVisible(vehiclew, false) vehicleL= guiCreateLabel(35, 51, 170, 34, "Pick your Vehicle:", false, vehiclew) vehicleG= guiCreateGridList(25, 69, 280, 342, false, vehiclew) vehC = guiGridListAddColumn(vehicleG, "Vehicle name", 0.9) for i = 1, 2 do vehrow = guiGridListAddRow(vehicleG) end guiGridListSetItemText(vehicleG, 0, 1, "Boxville", false, false) guiGridListSetItemText(vehicleG, 1, 1, "", false, false) vehicleb1 = guiCreateButton(29, 436, 105, 46, "Spawn vehicle", false, vehiclew) vehicleb2 = guiCreateButton(201, 436, 105, 46, "Cancel", false, vehiclew) function Click() if source == vehicleb1 then local Row, Col = guiGridListGetSelectedItem( vehicleG ) local NameVehicle = guiGridListGetItemText( vehicleG, Row, Col ) if NameVehicle == "Boxville" then triggerServerEvent("createCar",loaclPlayer) end end end addEventHandler( "onClientGUIClick", getRootElement(), Click ) -- Server Side ! vehicle = {} addEvent("createCar", true) addEventHandler("createCar", root, function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) end local x, y, z = getElementPosition(source) vehicle[source] = createVehicle(id, x, y, z) warpPedIntoVehicle(source, vehicle[source]) end ) استبدل id بآيدي السيارة الا تبيها Edited July 12, 2013 by Guest Link to comment
فاّرس Posted July 12, 2013 Share Posted July 12, 2013 بس ما قلت لنا وش تبي بالضبط؟ تبي الجريد ليست فيها كل السيارات , ولا تبي تحط سيارات محدده؟ Link to comment
Nickelz Posted July 12, 2013 Author Share Posted July 12, 2013 -- Client Side ! vehiclew = guiCreateWindow(781, 0, 324, 492, "Vehicles Panel", false) guiWindowSetSizable(vehiclew, false) guiSetVisible(vehiclew, false) vehicleL= guiCreateLabel(35, 51, 170, 34, "Pick your Vehicle:", false, vehiclew) vehicleG= guiCreateGridList(25, 69, 280, 342, false, vehiclew) vehC = guiGridListAddColumn(vehicleG, "Vehicle name", 0.9) for i = 1, 2 do vehrow = guiGridListAddRow(vehicleG) end guiGridListSetItemText(vehicleG, 0, 1, "Boxville", false, false) guiGridListSetItemText(vehicleG, 1, 1, "", false, false) vehicleb1 = guiCreateButton(29, 436, 105, 46, "Spawn vehicle", false, vehiclew) vehicleb2 = guiCreateButton(201, 436, 105, 46, "Cancel", false, vehiclew) function Click() if source == vehicleb1 then local Row, Col = guiGridListGetSelectedItem( vehicleG ) local NameVehicle = guiGridListGetItemText( vehicleG, Row, Col ) if NameVehicle == "Boxville" then triggerServerEvent("createCar",loaclPlayer) end end end addEventHandler( "onClientGUIClick", getRootElement(), Click ) -- Server Side ! vehicle = {} addEvent("createCar", true) addEventHandler("createCar", root, function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) end local x, y, z = getElementPosition(source) vehicle[source] = createVehicle(id, x, y, z) warpPedIntoVehicle(source, vehicle[source]) end ) استبدل id بآيدي السيارة الا تبيها يَ لبببى قلللببك بسس <3 طيب وشش الكود اللي يغير مسار السيارة اذا طلعت, يعني عندي سيارة اول ماتطلع , تطلع متجه للشمال, ابيها تتجه للجنوب مثلا Link to comment
iPrestege Posted July 12, 2013 Share Posted July 12, 2013 https://wiki.multitheftauto.com/wiki/CreateVehicle vehicle createVehicle ( int model, float x, float y, float z [, float rx, float ry, float rz, string numberplate, bool bDirection, int variant1, int variant2 ] ) rx: A floating point number representing the rotation about the X axis in degrees. ry: A floating point number representing the rotation about the Y axis in degrees. rz: A floating point number representing the rotation about the Z axis in degrees. Link to comment
فاّرس Posted July 12, 2013 Share Posted July 12, 2013 كذا بتطول شغلتك ذذ سوي جدول فيه ID vehID = { {435,432,424} } واستخدم , getVehicleNameFromModel getVehicleIDFromName tonumber Link to comment
Nickelz Posted July 12, 2013 Author Share Posted July 12, 2013 مشكؤووريين شباااب, ورربي مدري كيف اردها لككم, انتوا ماتدرون انا كيف اعاني من الجريد ليست 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