#Al-Ha[J]aRii Posted February 22, 2013 Author Share Posted February 22, 2013 You're Welcome . destroy مايشتغل addEventHandler("onClientGUIClick", root, function () if (source == GUIEditor.button[3]) then local vehicle = getPedOccupiedVehicle(localPlayer) destroyElement(vehicle) end end ) Link to comment
PaiN^ Posted February 22, 2013 Share Posted February 22, 2013 إستبدل getPedOccupiedVehicle : بـ getPlayerOccupiedVehicle Link to comment
Max+ Posted February 22, 2013 Share Posted February 22, 2013 ---ClientSide ! GUIEditor = { button = {}, label = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(520, 86, 298, 263, "Car System By Alhajarii", false) guiWindowSetSizable(GUIEditor.window[1], false) Repair = guiCreateButton(18, 45, 109, 50, "Repair",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") OnOff = guiCreateButton(169, 45, 109, 50,"On-Off",false,GUIEditor.window[1]) Flip = guiCreateButton(23, 148, 109, 50,"Flip",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "clear-normal") Destroy = guiCreateButton(173, 148, 105, 50, "Destroy", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(7, 206, 226, 42, "By Alhajarii", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiSetVisible (GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F5", "down", OpenWin) addEventHandler('onClientGUIClick', root, function() if ( source == Repair ) then triggerServerEvent('fix', localPlayer) elseif ( source == OnOff ) then triggerServerEvent('OnOff1', localPlayer) elseif ( source == 'Flip' ) then triggerServerEvent('qlb', localPlayer) elseif ( source == Destroy ) then triggerServerEvent('ksr', localPlayer) end end ) ---ServerSide ! addEvent('fix', true) addEventHandler('fix', root, function() if (isPedInVehicle( source ) ) then local veh = getPedOccupiedVehicle(source) local fix = fixVehicle (veh) if ( fix ) then outputChatBox (" Vehicle fixed ! ", source, 255, 255,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end end ) addEvent('OnOff1' ,true) addEventHandler('OnOff1', root, function() local state = getVehicleEngineState(getPedOccupiedVehicle(source)) if ( state ) then setVehicleEngineState(s1 , false) outputChatBox (" Engine Off ! ", source, 255, 255,0 ) else outputChatBox (" Engine On ! ", source, 255, 255,0 ) end end ) addEvent('qlb', true) addEventHandler('qlb' , root, function() if isPedInVehicle(source) then rx, ry, rz = getElementRotation(getPedOccupiedVehicle(source)) setElementRotation(getPedOccupiedVehicle(source), rx +180, ry, rz +180) outputChatBox(" Car Successfully fliped !", source, 255, 255, 0 ) end end ) addEvent('ksr', true) addEventHandler('ksr', root, function() if isPedInVehicle(source) then local veh = getPedOccupiedVehicle(source) destroyElement(veh) outputChatBox(" Car Successfully Destroyed ! ", source, 255, 255 ,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end ) مستر علم ياليت تقرى الكود اللي حطيته انت للاستبدال ! يقول لك الكود ملغي استخدم getPed Link to comment
PaiN^ Posted February 22, 2013 Share Posted February 22, 2013 ---ClientSide ! GUIEditor = { button = {}, label = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(520, 86, 298, 263, "Car System By Alhajarii", false) guiWindowSetSizable(GUIEditor.window[1], false) Repair = guiCreateButton(18, 45, 109, 50, "Repair",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") OnOff = guiCreateButton(169, 45, 109, 50,"On-Off",false,GUIEditor.window[1]) Flip = guiCreateButton(23, 148, 109, 50,"Flip",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "clear-normal") Destroy = guiCreateButton(173, 148, 105, 50, "Destroy", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(7, 206, 226, 42, "By Alhajarii", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiSetVisible (GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F5", "down", OpenWin) addEventHandler('onClientGUIClick', root, function() if ( source == Repair ) then triggerServerEvent('fix', localPlayer) elseif ( source == OnOff ) then triggerServerEvent('OnOff1', localPlayer) elseif ( source == 'Flip' ) then triggerServerEvent('qlb', localPlayer) elseif ( source == Destroy ) then triggerServerEvent('ksr', localPlayer) end end ) ---ServerSide ! addEvent('fix', true) addEventHandler('fix', root, function() if (isPedInVehicle( source ) ) then local veh = getPedOccupiedVehicle(source) local fix = fixVehicle (veh) if ( fix ) then outputChatBox (" Vehicle fixed ! ", source, 255, 255,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end end ) addEvent('OnOff1' ,true) addEventHandler('OnOff1', root, function() local state = getVehicleEngineState(getPedOccupiedVehicle(source)) if ( state ) then setVehicleEngineState(s1 , false) outputChatBox (" Engine Off ! ", source, 255, 255,0 ) else outputChatBox (" Engine On ! ", source, 255, 255,0 ) end end ) addEvent('qlb', true) addEventHandler('qlb' , root, function() if isPedInVehicle(source) then rx, ry, rz = getElementRotation(getPedOccupiedVehicle(source)) setElementRotation(getPedOccupiedVehicle(source), rx +180, ry, rz +180) outputChatBox(" Car Successfully fliped !", source, 255, 255, 0 ) end end ) addEvent('ksr', true) addEventHandler('ksr', root, function() if isPedInVehicle(source) then local veh = getPedOccupiedVehicle(source) destroyElement(veh) outputChatBox(" Car Successfully Destroyed ! ", source, 255, 255 ,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end ) السطور 25 و 29 و 30 مالهمـ داعي + مستر علم ياليت تقرى الكود اللي حطيته انت للاستبدال ! يقول لك الكود ملغي استخدم getPed إسمي آلم + ما فهمت عليك والله Link to comment
Max+ Posted February 23, 2013 Share Posted February 23, 2013 الم خش على كودك وشف فوق وش مكتوب ~ 1.getPlayerOccupiedVehicle هاذا الفنكشن تم ازالته استبدله ب 1.getPedOccupiedVehicle ~ Link to comment
#Al-Ha[J]aRii Posted February 23, 2013 Author Share Posted February 23, 2013 ---ClientSide ! GUIEditor = { button = {}, label = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(520, 86, 298, 263, "Car System By Alhajarii", false) guiWindowSetSizable(GUIEditor.window[1], false) Repair = guiCreateButton(18, 45, 109, 50, "Repair",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") OnOff = guiCreateButton(169, 45, 109, 50,"On-Off",false,GUIEditor.window[1]) Flip = guiCreateButton(23, 148, 109, 50,"Flip",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "clear-normal") Destroy = guiCreateButton(173, 148, 105, 50, "Destroy", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(7, 206, 226, 42, "By Alhajarii", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiSetVisible (GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F5", "down", OpenWin) addEventHandler('onClientGUIClick', root, function() if ( source == Repair ) then triggerServerEvent('fix', localPlayer) elseif ( source == OnOff ) then triggerServerEvent('OnOff1', localPlayer) elseif ( source == 'Flip' ) then triggerServerEvent('qlb', localPlayer) elseif ( source == Destroy ) then triggerServerEvent('ksr', localPlayer) end end ) ---ServerSide ! addEvent('fix', true) addEventHandler('fix', root, function() if (isPedInVehicle( source ) ) then local veh = getPedOccupiedVehicle(source) local fix = fixVehicle (veh) if ( fix ) then outputChatBox (" Vehicle fixed ! ", source, 255, 255,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end end ) addEvent('OnOff1' ,true) addEventHandler('OnOff1', root, function() local state = getVehicleEngineState(getPedOccupiedVehicle(source)) if ( state ) then setVehicleEngineState(s1 , false) outputChatBox (" Engine Off ! ", source, 255, 255,0 ) else outputChatBox (" Engine On ! ", source, 255, 255,0 ) end end ) addEvent('qlb', true) addEventHandler('qlb' , root, function() if isPedInVehicle(source) then rx, ry, rz = getElementRotation(getPedOccupiedVehicle(source)) setElementRotation(getPedOccupiedVehicle(source), rx +180, ry, rz +180) outputChatBox(" Car Successfully fliped !", source, 255, 255, 0 ) end end ) addEvent('ksr', true) addEventHandler('ksr', root, function() if isPedInVehicle(source) then local veh = getPedOccupiedVehicle(source) destroyElement(veh) outputChatBox(" Car Successfully Destroyed ! ", source, 255, 255 ,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end ) مستر علم ياليت تقرى الكود اللي حطيته انت للاستبدال ! يقول لك الكود ملغي استخدم getPed تسلمـ اشتغل Link to comment
PaiN^ Posted February 23, 2013 Share Posted February 23, 2013 Max+ تعديل على كود Server --> addEvent('fix', true) addEventHandler('fix', root, function() if (isPedInVehicle( source ) ) then local veh = getPedOccupiedVehicle(source) local fix = fixVehicle (veh) if ( fix ) then outputChatBox (" Vehicle fixed ! ", source, 255, 255,0 ) end else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end ) addEvent('OnOff1' ,true) addEventHandler('OnOff1', root, function() local veh = getPedOccupiedVehicle(source) local state = getVehicleEngineState(veh) if ( state ) then setVehicleEngineState(veh , false) outputChatBox (" Engine Off ! ", source, 255, 255,0 ) else setVehicleEngineState(veh , true) outputChatBox (" Engine On ! ", source, 255, 255,0 ) end end ) addEvent('qlb', true) addEventHandler('qlb' , root, function() if isPedInVehicle(source) then local veh = getPedOccupiedVehicle(source) rx, ry, rz = getElementRotation(veh) setElementRotation(veh, rx +180, ry, rz +180) outputChatBox(" Car Successfully fliped !", source, 255, 255, 0 ) end end ) addEvent('ksr', true) addEventHandler('ksr', root, function() if isPedInVehicle(source) then local veh = getPedOccupiedVehicle(source) destroyElement(veh) outputChatBox(" Car Successfully Destroyed ! ", source, 255, 255 ,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end ) Client --> GUIEditor = { button = {}, label = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(520, 86, 298, 263, "Car System By Alhajarii", false) guiWindowSetSizable(GUIEditor.window[1], false) Repair = guiCreateButton(18, 45, 109, 50, "Repair",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") OnOff = guiCreateButton(169, 45, 109, 50,"On-Off",false,GUIEditor.window[1]) Flip = guiCreateButton(23, 148, 109, 50,"Flip",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "clear-normal") Destroy = guiCreateButton(173, 148, 105, 50, "Destroy", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(7, 206, 226, 42, "By Alhajarii", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiSetVisible (GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F5", "down", OpenWin) addEventHandler('onClientGUIClick', root, function() if ( source == Repair ) then triggerServerEvent('fix', localPlayer) elseif ( source == OnOff ) then triggerServerEvent('OnOff1', localPlayer) elseif ( source == 'Flip' ) then triggerServerEvent('qlb', localPlayer) elseif ( source == Destroy ) then triggerServerEvent('ksr', localPlayer) end end ) !.. مجرب و شغال Link to comment
PaiN^ Posted February 23, 2013 Share Posted February 23, 2013 ---ClientSide ! GUIEditor = { button = {}, label = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(520, 86, 298, 263, "Car System By Alhajarii", false) guiWindowSetSizable(GUIEditor.window[1], false) Repair = guiCreateButton(18, 45, 109, 50, "Repair",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "clear-normal") OnOff = guiCreateButton(169, 45, 109, 50,"On-Off",false,GUIEditor.window[1]) Flip = guiCreateButton(23, 148, 109, 50,"Flip",false,GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "clear-normal") Destroy = guiCreateButton(173, 148, 105, 50, "Destroy", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(7, 206, 226, 42, "By Alhajarii", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiSetVisible (GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F5", "down", OpenWin) addEventHandler('onClientGUIClick', root, function() if ( source == Repair ) then triggerServerEvent('fix', localPlayer) elseif ( source == OnOff ) then triggerServerEvent('OnOff1', localPlayer) elseif ( source == 'Flip' ) then triggerServerEvent('qlb', localPlayer) elseif ( source == Destroy ) then triggerServerEvent('ksr', localPlayer) end end ) ---ServerSide ! addEvent('fix', true) addEventHandler('fix', root, function() if (isPedInVehicle( source ) ) then local veh = getPedOccupiedVehicle(source) local fix = fixVehicle (veh) if ( fix ) then outputChatBox (" Vehicle fixed ! ", source, 255, 255,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end end ) addEvent('OnOff1' ,true) addEventHandler('OnOff1', root, function() local state = getVehicleEngineState(getPedOccupiedVehicle(source)) if ( state ) then setVehicleEngineState(s1 , false) outputChatBox (" Engine Off ! ", source, 255, 255,0 ) else outputChatBox (" Engine On ! ", source, 255, 255,0 ) end end ) addEvent('qlb', true) addEventHandler('qlb' , root, function() if isPedInVehicle(source) then rx, ry, rz = getElementRotation(getPedOccupiedVehicle(source)) setElementRotation(getPedOccupiedVehicle(source), rx +180, ry, rz +180) outputChatBox(" Car Successfully fliped !", source, 255, 255, 0 ) end end ) addEvent('ksr', true) addEventHandler('ksr', root, function() if isPedInVehicle(source) then local veh = getPedOccupiedVehicle(source) destroyElement(veh) outputChatBox(" Car Successfully Destroyed ! ", source, 255, 255 ,0 ) else outputChatBox (" You Must Be in Vehicle ! ", source, 255, 255,0 ) end end ) مستر علم ياليت تقرى الكود اللي حطيته انت للاستبدال ! يقول لك الكود ملغي استخدم getPed تسلمـ اشتغل !! الكود صحيح لكنه ما يطفي السيارة بس يشغلها Link to comment
Max+ Posted February 23, 2013 Share Posted February 23, 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