z24d Posted August 6, 2015 Share Posted August 6, 2015 (edited) server local Vehicle = { }; addEvent ( "GiveCar", true ) addEventHandler ( "GiveCar", root, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) else local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( 411, x, y, z ) addVehicleUpgrade ( Vehicle[source], 1074 ) addVehicleUpgrade ( Vehicle[source], 1087 ) addVehicleUpgrade ( Vehicle[source], 1010 ) outputChatBox("Welcome To The Car", source, 255, 255, 0) warpPedIntoVehicle ( source, Vehicle[source] ) end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) addEventHandler ( "onPlayerQuit", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) client addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(336, 137, 402, 480, "VIP Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 446, 156, 30, "Created By #Monster", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") guiLabelSetColor(GUIEditor.label[1], 254, 0, 0) Vbtn = guiCreateButton(23, 72, 126, 49, "CreateVehicle", false, GUIEditor.window[1]) guiSetProperty(Vbtn, "NormalTextColour", "FFAAAAAA") Dmg = guiCreateButton(251, 72, 126, 49, "No Vehicle Dmg", false, GUIEditor.window[1]) guiSetProperty(Dmg, "NormalTextColour", "FFAAAAAA") Weapon = guiCreateButton(23, 178, 126, 49, "VIP Weapons", false, GUIEditor.window[1]) guiSetProperty(Weapon, "NormalTextColour", "FFAAAAAA") Stats = guiCreateButton(251, 178, 126, 49, "VIP Stats", false, GUIEditor.window[1]) guiSetProperty(Stats, "NormalTextColour", "FFAAAAAA") Skin = guiCreateButton(23, 281, 126, 49, "VIP Skin", false, GUIEditor.window[1]) guiSetProperty(Skin, "NormalTextColour", "FFAAAAAA") Health = guiCreateButton(251, 281, 126, 49, "VIP Health / Armor", false, GUIEditor.window[1]) guiSetProperty(Health, "NormalTextColour", "FFAAAAAA") Close = guiCreateButton(40, 361, 317, 49, "Close VIP Panel ", false, GUIEditor.window[1]) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") end ) bindKey ( "F5", "down", function ( ) \ guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Vbtn ) then triggerServerEvent ( "GiveCar", localPlayer ) end end ) وبغيت فنكشات اذا صدم مايجيه شيء .. Edited August 6, 2015 by Guest Link to comment
M[ROYAL]R Posted August 6, 2015 Share Posted August 6, 2015 يا اخى وضح انت ما قولت مشكلتك مشان نحلها ؟؟؟؟؟ Link to comment
z24d Posted August 6, 2015 Author Share Posted August 6, 2015 يا اخى وضح انت ما قولت مشكلتك مشان نحلها ؟؟؟؟؟ الوحة ماتضهر ! Link to comment
Simple. Posted August 6, 2015 Share Posted August 6, 2015 سطر 1 فيه client مادري ليه حاطها وسطر 25 فيه \ Link to comment
M[ROYAL]R Posted August 6, 2015 Share Posted August 6, 2015 يا اخى وضح انت ما قولت مشكلتك مشان نحلها ؟؟؟؟؟ الوحة ماتضهر ! ما جربت جرب addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(336, 137, 402, 480, "VIP Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 446, 156, 30, "Created By #Monster", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") guiLabelSetColor(GUIEditor.label[1], 254, 0, 0) Vbtn = guiCreateButton(23, 72, 126, 49, "CreateVehicle", false, GUIEditor.window[1]) guiSetProperty(Vbtn, "NormalTextColour", "FFAAAAAA") Dmg = guiCreateButton(251, 72, 126, 49, "No Vehicle Dmg", false, GUIEditor.window[1]) guiSetProperty(Dmg, "NormalTextColour", "FFAAAAAA") Weapon = guiCreateButton(23, 178, 126, 49, "VIP Weapons", false, GUIEditor.window[1]) guiSetProperty(Weapon, "NormalTextColour", "FFAAAAAA") Stats = guiCreateButton(251, 178, 126, 49, "VIP Stats", false, GUIEditor.window[1]) guiSetProperty(Stats, "NormalTextColour", "FFAAAAAA") Skin = guiCreateButton(23, 281, 126, 49, "VIP Skin", false, GUIEditor.window[1]) guiSetProperty(Skin, "NormalTextColour", "FFAAAAAA") Health = guiCreateButton(251, 281, 126, 49, "VIP Health / Armor", false, GUIEditor.window[1]) guiSetProperty(Health, "NormalTextColour", "FFAAAAAA") Close = guiCreateButton(40, 361, 317, 49, "Close VIP Panel ", false, GUIEditor.window[1]) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") end ) function royal() 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", royal) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Vbtn ) then triggerServerEvent ( "GiveCar", localPlayer ) end end ) Link to comment
M[ROYAL]R Posted August 6, 2015 Share Posted August 6, 2015 سطر 1 فيه client مادري ليه حاطهاوسطر 25 فيه \ سطر 1 يبي يفهمنا انه ملف كلينت سطر 25 ولله ما ادرى Link to comment
Rockyz Posted August 6, 2015 Share Posted August 6, 2015 Server : ---Server local Vehicle = { }; addEvent ( "GiveCar", true ) addEventHandler ( "GiveCar", root, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) else local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( 411, x, y, z ) addVehicleUpgrade ( Vehicle[source], 1074 ) addVehicleUpgrade ( Vehicle[source], 1087 ) addVehicleUpgrade ( Vehicle[source], 1010 ) outputChatBox("Welcome To The Car", source, 255, 255, 0) warpPedIntoVehicle ( source, Vehicle[source] ) end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) addEventHandler ( "onPlayerQuit", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) Client : ---Client addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(336, 137, 402, 480, "VIP Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 446, 156, 30, "Created By #Monster", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") guiLabelSetColor(GUIEditor.label[1], 254, 0, 0) Vbtn = guiCreateButton(23, 72, 126, 49, "CreateVehicle", false, GUIEditor.window[1]) guiSetProperty(Vbtn, "NormalTextColour", "FFAAAAAA") Dmg = guiCreateButton(251, 72, 126, 49, "No Vehicle Dmg", false, GUIEditor.window[1]) guiSetProperty(Dmg, "NormalTextColour", "FFAAAAAA") Weapon = guiCreateButton(23, 178, 126, 49, "VIP Weapons", false, GUIEditor.window[1]) guiSetProperty(Weapon, "NormalTextColour", "FFAAAAAA") Stats = guiCreateButton(251, 178, 126, 49, "VIP Stats", false, GUIEditor.window[1]) guiSetProperty(Stats, "NormalTextColour", "FFAAAAAA") Skin = guiCreateButton(23, 281, 126, 49, "VIP Skin", false, GUIEditor.window[1]) guiSetProperty(Skin, "NormalTextColour", "FFAAAAAA") Health = guiCreateButton(251, 281, 126, 49, "VIP Health / Armor", false, GUIEditor.window[1]) guiSetProperty(Health, "NormalTextColour", "FFAAAAAA") Close = guiCreateButton(40, 361, 317, 49, "Close VIP Panel ", false, GUIEditor.window[1]) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") end ) bindKey ( "F5", "down", function ( ) \ guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Vbtn ) then triggerServerEvent ( "GiveCar", localPlayer ) end end ) ماجربته + اتمنى افدتك Link to comment
Simple. Posted August 6, 2015 Share Posted August 6, 2015 (edited) Server : addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) + فيه واحد عدل الكود مادري ليه تحط كودك وثآني شيء ماشوف بالموضوع احد طلب لما تنفجر السياره او يطلع اللاعب تختفي السياره Edited August 6, 2015 by Guest Link to comment
Rockyz Posted August 6, 2015 Share Posted August 6, 2015 Server : addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) + فيه واحد عدل الكود مادري ليه تحط كودك وثآني شيء ماشوف بالموضوع احد طلب لما تنفجر السياره او يطلع اللاعب تختفي السياره انا ماسويت شي غير اني حطيت --- Link to comment
z24d Posted August 6, 2015 Author Share Posted August 6, 2015 (edited) طيب اخوي addEventHandler("onVehicleDamage" , getRootElement(), function() cancelEvent() end) اخوي بغيت الكود يخلي السيارة مايجيها دامج اذا صدم او صارلة شيء! ماضبط Edited August 6, 2015 by Guest Link to comment
Naif Posted August 6, 2015 Share Posted August 6, 2015 سطر 7 حط بدآل الـ else < end وشيل اند . Link to comment
M[ROYAL]R Posted August 6, 2015 Share Posted August 6, 2015 طيب اخوي addEventHandler("onVehicleDamage" , getRootElement(), function() cancleEvent() end) اولأ الكود شغال ؟ ثانيآ وش بيها ذى Link to comment
Simple. Posted August 6, 2015 Share Posted August 6, 2015 حبيبي انت كذا تحوسنا وتحوس الي يبي يساعد يعني تحط كود خطاء ونصححه تروح تعدل ع الي فوق وبعدين تطلب طلب ثاني وتحطه خطاء وبعدين تصححه وتمشي ي ليت تساعدنا عشان نقدر نسآعدك ! Link to comment
M[ROYAL]R Posted August 6, 2015 Share Posted August 6, 2015 حبيبي انت كذا تحوسنا وتحوس الي يبي يساعد يعني تحط كود خطاء ونصححه تروح تعدل ع الي فوق وبعدين تطلب طلب ثانيوتحطه خطاء وبعدين تصححه وتمشي ي ليت تساعدنا عشان نقدر نسآعدك ! +1111111 Link to comment
z24d Posted August 6, 2015 Author Share Posted August 6, 2015 حبيبي انت كذا تحوسنا وتحوس الي يبي يساعد يعني تحط كود خطاء ونصححه تروح تعدل ع الي فوق وبعدين تطلب طلب ثانيوتحطه خطاء وبعدين تصححه وتمشي ي ليت تساعدنا عشان نقدر نسآعدك ! والله حتى انا حست نفسي ابغا فنكش اذا ضغط زر يخلي السياره اذا صدمت ماتتدمج واذا ضغط مره ثانية يخليها تتدمج Link to comment
Simple. Posted August 6, 2015 Share Posted August 6, 2015 onClientGUIClick setVehicleDamageProof سو متغير او حط داتا للسياره عشان تتحق انها مفعله او لا ! Link to comment
Naif Posted August 6, 2015 Share Posted August 6, 2015 CarDamage = true addEventHandler('onClientGUIClick',root, function ( ) if ( source == Dam ) then if ( getPedOccupiedVehicle ( localPlayer ) ) then CarDamage = not CarDamage setVehicleDamageProof(getPedOccupiedVehicle ( localPlayer ) , CarDamage ) end end end ) جرب Link to comment
z24d Posted August 6, 2015 Author Share Posted August 6, 2015 CarDamage = true addEventHandler('onClientGUIClick',root, function ( ) if ( source == Dam ) then if ( getPedOccupiedVehicle ( localPlayer ) ) then CarDamage = not CarDamage setVehicleDamageProof(getPedOccupiedVehicle ( localPlayer ) , CarDamage ) end end end ) جرب الله يعطيك العافية يخوي بس الوحة ماتطلع يعني اضغط اف5 ماتطلع الوحة Link to comment
z24d Posted August 6, 2015 Author Share Posted August 6, 2015 addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(336, 137, 402, 480, "VIP Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 446, 156, 30, "Created By #Monster", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") guiLabelSetColor(GUIEditor.label[1], 254, 0, 0) Vbtn = guiCreateButton(23, 72, 126, 49, "CreateVehicle", false, GUIEditor.window[1]) guiSetProperty(Vbtn, "NormalTextColour", "FFAAAAAA") Dmg = guiCreateButton(251, 72, 126, 49, "No Vehicle Dmg", false, GUIEditor.window[1]) guiSetProperty(Dmg, "NormalTextColour", "FFAAAAAA") Weapon = guiCreateButton(23, 178, 126, 49, "VIP Weapons", false, GUIEditor.window[1]) guiSetProperty(Weapon, "NormalTextColour", "FFAAAAAA") Stats = guiCreateButton(251, 178, 126, 49, "VIP Stats", false, GUIEditor.window[1]) guiSetProperty(Stats, "NormalTextColour", "FFAAAAAA") Skin = guiCreateButton(23, 281, 126, 49, "VIP Skin", false, GUIEditor.window[1]) guiSetProperty(Skin, "NormalTextColour", "FFAAAAAA") Health = guiCreateButton(251, 281, 126, 49, "VIP Health / Armor", false, GUIEditor.window[1]) guiSetProperty(Health, "NormalTextColour", "FFAAAAAA") Close = guiCreateButton(40, 361, 317, 49, "Close VIP Panel ", false, GUIEditor.window[1]) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") end ) bindKey ( "F5", "down", function ( ) guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Vbtn ) then triggerServerEvent ( "GiveCar", localPlayer ) end end ) الله يعافيك - آطرح الكلنت Link to comment
Naif Posted August 6, 2015 Share Posted August 6, 2015 addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(336, 137, 402, 480, "VIP Panel", false) guiWindowSetSizable(wnd, false) ll = guiCreateLabel(10, 446, 156, 30, "Created By #Monster", false, wnd) guiSetFont(ll, "default-small") guiLabelSetColor(ll, 254, 0, 0) Vbtn = guiCreateButton(23, 72, 126, 49, "CreateVehicle", false, wnd) guiSetProperty(Vbtn, "NormalTextColour", "FFAAAAAA") Dmg = guiCreateButton(251, 72, 126, 49, "No Vehicle Dmg", false, wnd) guiSetProperty(Dmg, "NormalTextColour", "FFAAAAAA") Weapon = guiCreateButton(23, 178, 126, 49, "VIP Weapons", false, wnd) guiSetProperty(Weapon, "NormalTextColour", "FFAAAAAA") Stats = guiCreateButton(251, 178, 126, 49, "VIP Stats", false, wnd) guiSetProperty(Stats, "NormalTextColour", "FFAAAAAA") Skin = guiCreateButton(23, 281, 126, 49, "VIP Skin", false, wnd) guiSetProperty(Skin, "NormalTextColour", "FFAAAAAA") Health = guiCreateButton(251, 281, 126, 49, "VIP Health / Armor", false, wnd) guiSetProperty(Health, "NormalTextColour", "FFAAAAAA") Close = guiCreateButton(40, 361, 317, 49, "Close VIP Panel ", false, wnd) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") end ) bindKey ( "F5", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Vbtn ) then triggerServerEvent ( "GiveCar", localPlayer ) end end ) Link to comment
z24d Posted August 6, 2015 Author Share Posted August 6, 2015 addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(336, 137, 402, 480, "VIP Panel", false) guiWindowSetSizable(wnd, false) ll = guiCreateLabel(10, 446, 156, 30, "Created By #Monster", false, wnd) guiSetFont(ll, "default-small") guiLabelSetColor(ll, 254, 0, 0) Vbtn = guiCreateButton(23, 72, 126, 49, "CreateVehicle", false, wnd) guiSetProperty(Vbtn, "NormalTextColour", "FFAAAAAA") Dmg = guiCreateButton(251, 72, 126, 49, "No Vehicle Dmg", false, wnd) guiSetProperty(Dmg, "NormalTextColour", "FFAAAAAA") Weapon = guiCreateButton(23, 178, 126, 49, "VIP Weapons", false, wnd) guiSetProperty(Weapon, "NormalTextColour", "FFAAAAAA") Stats = guiCreateButton(251, 178, 126, 49, "VIP Stats", false, wnd) guiSetProperty(Stats, "NormalTextColour", "FFAAAAAA") Skin = guiCreateButton(23, 281, 126, 49, "VIP Skin", false, wnd) guiSetProperty(Skin, "NormalTextColour", "FFAAAAAA") Health = guiCreateButton(251, 281, 126, 49, "VIP Health / Armor", false, wnd) guiSetProperty(Health, "NormalTextColour", "FFAAAAAA") Close = guiCreateButton(40, 361, 317, 49, "Close VIP Panel ", false, wnd) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") end ) bindKey ( "F5", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Vbtn ) then triggerServerEvent ( "GiveCar", localPlayer ) end end ) طلعتلي لوحة بدون ازرار\\ وشلون استخدم الديبق 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