^#Dream Posted May 18, 2014 Share Posted May 18, 2014 local window = guiCreateWindow(353, 146, 323, 358, "Cars GUI", false) guiWindowSetSizable(window, false) guiSetVisible (window,false) guiSetAlpha(window, 1.00) local gridlist = guiCreateGridList(33, 46, 256, 253, false, window) guiGridListAddColumn(gridlist, "Cars", 0.9) local button2 = guiCreateButton(29, 311, 68, 35, "Select", false, window) guiSetProperty(button2, "NormalTextColour", "ffff0000") local button = guiCreateButton(288, 25, 26, 22, "X", false, window) guiSetProperty(button, "NormalTextColour", "FFFF0000") local car = { 411, 451, 541, 560, 562, 565 } for _,vehicle in ipairs (car) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1,getVehicleNameFromModel (tonumber( vehicle )), false, false ) end addEventHandler("onClientGUIClick",button2, function () local carxx = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) if carxx == "" then return outputChatBox("Please Select a Car",255, 255, 255,false) end triggerServerEvent("carx",localPlayer,carxx) guiSetVisible(window,false) showCursor(false) end,false ) ------------ local car = createMarker ( -2408.63232,-598.40387,132.64844, "cylinder", 2.5, 255, 255, 255, 255 ) addEventHandler('onClientMarkerHit', car, function ( hitPlayer ) if ( hitPlayer == localPlayer ) and getPlayerTeam( hitPlayer ) and getTeamName( getPlayerTeam( hitPlayer ) ) == 'No Team' and getElementData( hitPlayer, 'Group' ) == 'Extreme' then guiSetVisible ( window ,true ) showCursor( true ) guiSetInputEnabled(false) end end ) addEventHandler( "onClientGUIClick", button , function () guiSetVisible(window,false) showCursor(false,false) end ) الاضافة الي ابيها هي AddVehicleUpgrade Link to comment
3NAD Posted May 18, 2014 Share Posted May 18, 2014 كيف تبيها تنضاف .. ؟ يعني هي وحدة و راح تكون لكل سيارة ياخذها من اللوحة ؟ Link to comment
^#Dream Posted May 18, 2014 Author Share Posted May 18, 2014 كيف تبيها تنضاف .. ؟يعني هي وحدة و راح تكون لكل سيارة ياخذها من اللوحة ؟ انا ابيها Infernus : Nos (Nitro) Turismo : Nos Bullet : Nos والباقي عليها كل الابقريد Sultan + Egley + Flash All Upgrade's Link to comment
3NAD Posted May 19, 2014 Share Posted May 19, 2014 اطرح كود الإيفنت من جانب سيرفر حق اللي يسوي السيارة Link to comment
^#Dream Posted May 19, 2014 Author Share Posted May 19, 2014 اطرح كود الإيفنت من جانب سيرفرحق اللي يسوي السيارة addEvent("carx",true) addEventHandler("carx",root, function (carxx) if getElementData ( source, "destroy" ) then destroyElement ( getElementData ( source, "destroy")) end local carname = getVehicleIDFromName(carxx) local x, y, z = getElementPosition ( source ) Vehicle = createVehicle (carname, x+2, y, z ) warpPedIntoVehicle ( source, Vehicle) setElementData ( source, "destroy", Vehicle ) end ) Link to comment
3NAD Posted May 19, 2014 Share Posted May 19, 2014 جرب كذا upgrades = { ["Infernus"] = { 1010 }; ["Turismo"] = { 1010 }; ["Bullet"] = { 1010 }; }; addUpgrades = function ( vehicle ) if vehicle then if isElement ( vehicle ) then local upg = upgrades[getVehicleName( vehicle )] if upg then for i, v in pairs ( upg ) do addVehicleUpgrade ( vehicle, v ) end else addVehicleUpgrade ( vehicle, 1010 ) -- النيترو addVehicleUpgrade ( vehicle, 1087 ) -- الهيدروليك addVehicleUpgrade ( vehicle, 1098 ) -- الجنوط end end end end addEvent ( "carx", true ) addEventHandler ( "carx", root, function ( carxx ) if getElementData ( source, "destroy" ) then destroyElement ( getElementData ( source, "destroy" ) ) end local carname = getVehicleIDFromName( carxx ) if carname then local x, y, z = getElementPosition ( source ) local Vehicle = createVehicle ( carname, x+2, y, z ) warpPedIntoVehicle ( source, Vehicle ) setElementData ( source, "destroy", Vehicle ) addUpgrades ( Vehicle ) end end ) Link to comment
^#Dream Posted May 19, 2014 Author Share Posted May 19, 2014 الله يعطيك الععافيةة ي عناد بس عندي مششكلة انه مايقبل القروب سيستم حق احمد فيف بس يقبل حق العقرب انا ابيه يقبل القروب سيستم حق احمد فيف Link to comment
^#Dream Posted May 19, 2014 Author Share Posted May 19, 2014 انا اذا جيت سويت قروب جديد بنفس الي كاتبه getElementData( hitPlayer, 'Group' ) == 'Extreme' then اذا جيت سويت قروب اسمه Extreme في السكربت حق احمد فيف مايفتح لي الـ Gui معي اني داخل التيم ومسوي القروب بس اذا سويته بالسكربت حق العقرب يفتح لي الـ GUI 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