iQsaMi~Mg.HaMoTa_oK! Posted July 23, 2016 Share Posted July 23, 2016 مطلوب فنكشن لما تضغط علا زر مربع يخلي دم السياره ما ينتهي او يخليه 1000 Link to comment
saitama Posted July 24, 2016 Share Posted July 24, 2016 addEventHandler("onClientGUIClick",root, function () if source == button then setVehicleDamageProof Link to comment
Adham Posted July 24, 2016 Share Posted July 24, 2016 ججرب addEventHandler ( "onClientGUIClick", button, function ( ) setVehicleDamageProof(localPlayer, true) end ) Link to comment
Me[Z]oO Posted July 24, 2016 Share Posted July 24, 2016 ججرب addEventHandler ( "onClientGUIClick", button, function ( ) setVehicleDamageProof(localPlayer, true) end ) bool setVehicleDamageProof ( vehicle theVehicle, bool damageProof ) Link to comment
iPrestege Posted July 24, 2016 Share Posted July 24, 2016 isPedInVehicle -- يتحقق انة الاعب موجود في مركبة getPedOccupiedVehicle -- يجيب لك المركبة اللي اللاعب موجود فيها setVehicleDamageProof -- تعديل تأثر المركبة بالصدمات -- Event 'onClientGUIClick' Link to comment
Adham Posted July 25, 2016 Share Posted July 25, 2016 (edited) ججرب addEventHandler ( "onClientGUIClick", button, function ( ) setVehicleDamageProof(localPlayer, true) end ) bool setVehicleDamageProof ( vehicle theVehicle, bool damageProof ) معلش, م شفت الفكشن كويس شوف ميزو كودي صح ولا لا addEventHandler ( "onClientGUIClick",button, function ( ) local Vehicle = getPedOccupiedVehicle( localPlayer ) if isPedInVehicle( Vehicle ) then setVehicleDamageProof( Vehicle, true) end end ) Edited July 25, 2016 by Guest Link to comment
Me[Z]oO Posted July 25, 2016 Share Posted July 25, 2016 معلش, م شفت الفكشن كويس شوف ميزو كودي صح ولا لا addEventHandler ( "onClientGUIClick",button, function ( ) local Vehicle = getPedOccupiedVehicle( source ) if isPedInVehicle( Vehicle ) then setVehicleDamageProof( Vehicle, true) end end ) فيه اخطاء التصحيح addEventHandler ( "onClientGUIClick",button, function ( ) local Vehicle = getPedOccupiedVehicle( localPlayer ) if Vehicle then setVehicleDamageProof( Vehicle, true) end end ) Link to comment
Ahmed Ly Posted July 25, 2016 Share Posted July 25, 2016 (edited) كلنت addEventHandler ( "onClientGUIClick",root, function ( ) if source == button then triggerServerEvent("Event",localPlayer,"يجب ان تكون في السياره","ليس لديك سياره") end end ) سيرفر addEvent("Event",true) addEventHandler("Event",root, function (text1,text2) if not isPedInVehicle(source) then outputChatBox(text1,source,0,255,0) return end local Vehicle = getPedOccupiedVehicle(source) if Vehicle then setVehicleDamageProof( Vehicle, true) else outputChatBox(text2,source,0,255,0) end end ) Edited July 25, 2016 by Guest Link to comment
iQsaMi~Mg.HaMoTa_oK! Posted July 25, 2016 Author Share Posted July 25, 2016 مشكور لكم بس مشكله جربت كلشي ارسلتوه ما زبط وركبت اخر شي ما زبط المود GUIEditor = { button = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(917, 204, 235, 477, "", false) guiSetAlpha(GUIEditor.button[1], 0.79) tankcar = guiCreateButton(15, 28, 210, 36, "Tank CaR", false, GUIEditor.button[1]) guiSetProperty(tankcar, "NormalTextColour", "FFFD0000") GUIEditor.button[2] = guiCreateButton(15, 28, 210, 36, "Tank CaR", false, GUIEditor.button[1]) infernusmod = guiCreateButton(15, 97, 210, 36, "Infernus Mod", false, GUIEditor.button[1]) guiSetProperty(infernusmod, "NormalTextColour", "FFFD0000") NRG = guiCreateButton(15, 163, 210, 36, "NRG", false, GUIEditor.button[1]) guiSetProperty(NRG, "NormalTextColour", "FFFC0500") infernus = guiCreateButton(15, 229, 210, 36, "Infernus", false, GUIEditor.button[1]) guiSetProperty(infernus, "NormalTextColour", "FFFC0500") monster = guiCreateButton(15, 297, 210, 36, "Monster", false, GUIEditor.button[1]) guiSetProperty(monster, "NormalTextColour", "FFFC0500") GUIEditor.label[1] = guiCreateLabel(25, 9, 190, 15, "ViP Panel", false, GUIEditor.button[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 95, 254) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.staticimage[1] = guiCreateStaticImage(11, 343, 214, 124, ":VIP/VIP.png", false, GUIEditor.button[1]) guiSetVisible(GUIEditor.button[1],false) end ) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor.button[1], not guiGetVisible ( GUIEditor.button[1] ) ) showCursor ( guiGetVisible ( GUIEditor.button[1] ) ) end ) addEventHandler("onClientGUIClick",root, function () if source == infernus then triggerServerEvent("onPlayerCar",localPlayer,"تم اعطاك سياره",0,255,0) end end ) addEventHandler ( "onClientGUIClick",tankcar, function ( ) local Vehicle = getPedOccupiedVehicle( localPlayer ) if Vehicle then setVehicleDamageProof( Vehicle, true) end end ) جربت وبسيرفر نسخت مثل ما كتبتولي وما شتغل Link to comment
Adham Posted July 25, 2016 Share Posted July 25, 2016 (edited) جيب طيب ملف السيرفر لان الكلنت م في شي غلط . + Ahmed Ly addEventHandler ( "onClientGUIClick",button, + if source == button then addEventHandler ( "onClientGUIClick",root, Edited July 25, 2016 by Guest Link to comment
iQsaMi~Mg.HaMoTa_oK! Posted July 25, 2016 Author Share Posted July 25, 2016 local car = { } function carbuy (text,r,g,b) if isElement(car[source]) then destroyElement(car[source]) end local x,y,z = getElementPosition(source) car[source] = createVehicle(411,x,y+2,z) warpPedIntoVehicle(source,car[source]) outputChatBox(text,source,r,g,b) end addEvent("onPlayerCar",true) addEventHandler("onPlayerCar",root,carbuy) addEvent("Event",true) addEventHandler("Event",root, function (text1,text2) if not isPedInVehicle(source) then outputChatBox(text1,source,0,255,0) return end local Vehicle = getPedOccupiedVehicle(source) if Vehicle then setVehicleDamageProof( Vehicle, true) else outputChatBox(text2,source,0,255,0) end end ) Link to comment
Adham Posted July 25, 2016 Share Posted July 25, 2016 ججرب -- Client --- addEventHandler("onClientGUIClick",infernus, function () triggerServerEvent( "onPlayerCar",localPlayer ) end ) addEventHandler ( "onClientGUIClick",tankcar, function ( ) local Vehicle = getPedOccupiedVehicle( localPlayer ) if Vehicle then setVehicleDamageProof( Vehicle, true) end end ) -- Server -- local Car = {} addEvent("onPlayerCar",true) addEventHandler("onPlayerCar",root, function ( ) if isElement( Car[source ) then destroyElement( Car[source ) end local PosX , PosY , PosZ = getElementPosition ( source ) Car[ source ] = createVehicle( 411 , PosX , PosY , PosZ ) warpPedIntoVehicle(source,Car[source]) outputChatBox ( "done u give",source,255,255,255,true ) end end ) Link to comment
iQsaMi~Mg.HaMoTa_oK! Posted July 25, 2016 Author Share Posted July 25, 2016 مدري سويت مثل ما قلتلي ما زبط ما اعطا سياره انفرنس حتا ض مشكور عجهدك Link to comment
!#NssoR_) Posted July 25, 2016 Share Posted July 25, 2016 بما اني فاضي سويته لك #Client. GUIEditor = { button = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(917, 204, 235, 477, "", false) guiSetAlpha(GUIEditor.button[1], 0.79) tankcar = guiCreateButton(15, 28, 210, 36, "Tank CaR", false, GUIEditor.button[1]) guiSetProperty(tankcar, "NormalTextColour", "FFFD0000") infernusmod = guiCreateButton(15, 97, 210, 36, "Infernus Mod", false, GUIEditor.button[1]) guiSetProperty(infernusmod, "NormalTextColour", "FFFD0000") NRG = guiCreateButton(15, 163, 210, 36, "NRG", false, GUIEditor.button[1]) guiSetProperty(NRG, "NormalTextColour", "FFFC0500") infernus = guiCreateButton(15, 229, 210, 36, "Infernus", false, GUIEditor.button[1]) guiSetProperty(infernus, "NormalTextColour", "FFFC0500") monster = guiCreateButton(15, 297, 210, 36, "Monster", false, GUIEditor.button[1]) guiSetProperty(monster, "NormalTextColour", "FFFC0500") GUIEditor.label[1] = guiCreateLabel(25, 9, 190, 15, "ViP Panel", false, GUIEditor.button[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 95, 254) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.staticimage[1] = guiCreateStaticImage(11, 343, 214, 124, "VIP.png", false, GUIEditor.button[1]) guiSetVisible(GUIEditor.button[1],false) end ) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor.button[1], not guiGetVisible ( GUIEditor.button[1] ) ) showCursor ( guiGetVisible ( GUIEditor.button[1] ) ) end ) addEventHandler("onClientGUIClick",resourceRoot, function () if ( source == infernus ) then triggerServerEvent("onPlayerCar",localPlayer,411) -- ضيف ايدي السيارة الي تبيها elseif ( source == monster ) then triggerServerEvent("onPlayerCar",localPlayer,532) -- حط ايدي المونستر elseif ( source == tankcar ) then triggerServerEvent("Strong:Car",localPlayer) end end ) #Server. Table = {} function givePlayerVehicle(thePlayer,ID) if getElementType (thePlayer) == "player" then if type(ID) == "number" then if thePlayer and ID then if ( Table[thePlayer] ) then destroyElement(Table[thePlayer]) end local x,y,z = getElementPosition(thePlayer) Table[thePlayer] = createVehicle(tonumber(ID),x,y,z) warpPedIntoVehicle(thePlayer,Table[thePlayer]) outputChatBox('* تم إعطائك السيارة',thePlayer,255,255,9,true) else error("There is Argument minus") end else error("Bad Argument 2 must number") end else error("Bad Argument 1 must player") end end addEvent("Strong:Car",true) addEventHandler("Strong:Car",root, function ( ) local Vehicle = getPedOccupiedVehicle(client) if Vehicle then if ( Table[client] == Vehicle ) then setVehicleDamageProof( Vehicle, true) outputChatBox('سيارتك الان لن تتكسر',client,255,255,0) else outputChatBox('السياره التي تركبها ليست من لوحة الـفي اي بي !',client,255,0,0) end else outputChatBox('يجب ان تكون بسيارة',client,255,255,0) end end ) addEvent("onPlayerCar",true) addEventHandler("onPlayerCar",root, function (ID) givePlayerVehicle ( client , ID ) end ) addEventHandler('onPlayerQuit',root, function () if ( Table[source] ) then if ( isElement(Table[source]) ) then destroyElement(Table[source]) end Table[source] = nil end end) إرشادات يجب التاكد منها لكي يعمل السكربت بشكل صحيح : سطر 26 تأكد من مسار الصورة ,, وتأكد انك ضايف الصورة بالميتا بهذا الشكل 'VIP.png' /> وتأكد ان كل ملف بمكانه الصحيح ماتحط الكلنت بمكان السيرفر و السيرفر مكان الكلنت Link to comment
iQsaMi~Mg.HaMoTa_oK! Posted July 25, 2016 Author Share Posted July 25, 2016 بما اني فاضي سويته لك #Client. GUIEditor = { button = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(917, 204, 235, 477, "", false) guiSetAlpha(GUIEditor.button[1], 0.79) tankcar = guiCreateButton(15, 28, 210, 36, "Tank CaR", false, GUIEditor.button[1]) guiSetProperty(tankcar, "NormalTextColour", "FFFD0000") infernusmod = guiCreateButton(15, 97, 210, 36, "Infernus Mod", false, GUIEditor.button[1]) guiSetProperty(infernusmod, "NormalTextColour", "FFFD0000") NRG = guiCreateButton(15, 163, 210, 36, "NRG", false, GUIEditor.button[1]) guiSetProperty(NRG, "NormalTextColour", "FFFC0500") infernus = guiCreateButton(15, 229, 210, 36, "Infernus", false, GUIEditor.button[1]) guiSetProperty(infernus, "NormalTextColour", "FFFC0500") monster = guiCreateButton(15, 297, 210, 36, "Monster", false, GUIEditor.button[1]) guiSetProperty(monster, "NormalTextColour", "FFFC0500") GUIEditor.label[1] = guiCreateLabel(25, 9, 190, 15, "ViP Panel", false, GUIEditor.button[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 95, 254) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.staticimage[1] = guiCreateStaticImage(11, 343, 214, 124, "VIP.png", false, GUIEditor.button[1]) guiSetVisible(GUIEditor.button[1],false) end ) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor.button[1], not guiGetVisible ( GUIEditor.button[1] ) ) showCursor ( guiGetVisible ( GUIEditor.button[1] ) ) end ) addEventHandler("onClientGUIClick",resourceRoot, function () if ( source == infernus ) then triggerServerEvent("onPlayerCar",localPlayer,411) -- ضيف ايدي السيارة الي تبيها elseif ( source == monster ) then triggerServerEvent("onPlayerCar",localPlayer,532) -- حط ايدي المونستر elseif ( source == tankcar ) then triggerServerEvent("Strong:Car",localPlayer) end end ) #Server. Table = {} function givePlayerVehicle(thePlayer,ID) if getElementType (thePlayer) == "player" then if type(ID) == "number" then if thePlayer and ID then if ( Table[thePlayer] ) then destroyElement(Table[thePlayer]) end local x,y,z = getElementPosition(thePlayer) Table[thePlayer] = createVehicle(tonumber(ID),x,y,z) warpPedIntoVehicle(thePlayer,Table[thePlayer]) outputChatBox('* تم إعطائك السيارة',thePlayer,255,255,9,true) else error("There is Argument minus") end else error("Bad Argument 2 must number") end else error("Bad Argument 1 must player") end end addEvent("Strong:Car",true) addEventHandler("Strong:Car",root, function ( ) local Vehicle = getPedOccupiedVehicle(client) if Vehicle then if ( Table[client] == Vehicle ) then setVehicleDamageProof( Vehicle, true) outputChatBox('سيارتك الان لن تتكسر',client,255,255,0) else outputChatBox('السياره التي تركبها ليست من لوحة الـفي اي بي !',client,255,0,0) end else outputChatBox('يجب ان تكون بسيارة',client,255,255,0) end end ) addEvent("onPlayerCar",true) addEventHandler("onPlayerCar",root, function (ID) givePlayerVehicle ( client , ID ) end ) addEventHandler('onPlayerQuit',root, function () if ( Table[source] ) then if ( isElement(Table[source]) ) then destroyElement(Table[source]) end Table[source] = nil end end) إرشادات يجب التاكد منها لكي يعمل السكربت بشكل صحيح : سطر 26 تأكد من مسار الصورة ,, وتأكد انك ضايف الصورة بالميتا بهذا الشكل 'VIP.png' /> وتأكد ان كل ملف بمكانه الصحيح ماتحط الكلنت بمكان السيرفر و السيرفر مكان الكلنت ضض مشكور لك كثير مشكور علا جهدك بس مشكله ض1 ركبته وما شتغل بلمره يعني اكبس علا انفرنس ما يعطينيي وما يشتغل انه السياره ما تخرب ض1 وكمان نسخته ولصق بدون ما اعدل ض ما زبط شف http://s000.tinyupload.com/index.php?fi ... 6829875863 ذا المود عشان تتأكد Link to comment
!#NssoR_) Posted July 25, 2016 Share Posted July 25, 2016 المشكلة كانت لازم تخش علي Encoding وتروح لـ Encoding UTF-8 المهم حمل المود من هنا واستمتع سبحان الله وبحمده Link to comment
iQsaMi~Mg.HaMoTa_oK! Posted July 25, 2016 Author Share Posted July 25, 2016 المشكلة كانت لازم تخش علي Encoding وتروح لـ Encoding UTF-8 المهم حمل المود من هنا واستمتع سبحان الله وبحمده ههههههه مدري وش بقولك ياخي شكرا كثير الك شكرا شكرا شكرا ض1 وممشكور لكل واحد حاول يساعدني وعلا تعبه شكرا ض غلبناكم Link to comment
!#NssoR_) Posted July 25, 2016 Share Posted July 25, 2016 المشكلة كانت لازم تخش علي Encoding وتروح لـ Encoding UTF-8 المهم حمل المود من هنا واستمتع سبحان الله وبحمده ههههههه مدري وش بقولك ياخي شكرا كثير الك شكرا شكرا شكرا ض1 وممشكور لكل واحد حاول يساعدني وعلا تعبه شكرا ض غلبناكم حيااك الله ماسوينا شي 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