Dr.Xen Posted August 26, 2014 Share Posted August 26, 2014 السلام عليكم ورحمة الله وبركاته.. شباب ابي تصحيح الكود مشكلتين : الأولى : الماركر تشتغل حتى لو مريت من فوق السماء الثانية : اللوحة تفتح لكن ماتشتغل شي اضغط اغلاق ماتصير واضغط تشغيل ماتشتغل ... كلشي GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Edit = {} GUIEditor_Label = {} mArkSound = createMarker( 1501.1688232422,787.99938964844,112.31844329834, 'cylinder', 1.7000000476837, 225, 0, 0, 255 ) local xx,yy = guiGetScreenSize() local xx = xx - 396 local yy = yy - 161 wnd = guiCreateWindow(xx/2,yy/2,396,161,".: Sound System :. [Pro]",false) guiSetAlpha(wnd,1) guiWindowSetSizable(wnd,false) GUIEditor_Edit[1] = guiCreateEdit(10,22,328,24,"",false,wnd) GUIEditor_Label[1] = guiCreateLabel(340,22,48,24,"الرابط ",false,wnd) addEvent('okS', true) addEventHandler('okS', root, function(url) sound = playSound3D( url, 1496.7551269531, 786.17156982422, 113.31844329834 ) if sound then setSoundVolume ( sound, 400 ) setSoundMaxDistance(sound, 400) end end ) addEvent('okStop', true) addEventHandler('okStop', root, function() destroyElement( sound ) end ) addEvent('ptf', true) addEventHandler('ptf', root, function() if not isElement( sound ) then outputChatBox('لم يتم تشغيل الصوت', 255, 0, 0, false) return end if isSoundPaused(sound) then setSoundPaused(sound, false) outputChatBox(' تم استئناف الصوت ', 0, 255, 0, false) else setSoundPaused(sound, true) outputChatBox(' تم ايقاف الصوت مؤقت ', 0, 255, 0, false) end end ) GUIEditor_Button[8] = guiCreateButton(11,80,117,29,"اغلاق الوحة",false,wnd) GUIEditor_Button[5] = guiCreateButton(274,65,102,26,"تشغيل الصوت",false,wnd) GUIEditor_Button[6] = guiCreateButton(166,65,102,26,"ايقاف الصوت",false,wnd) GUIEditor_Button[7] = guiCreateButton(169,108,207,28,"ايقاف \ استئناف الصوت مؤقت",false,wnd) addEventHandler('onClientGUIClick', root, function() if ( source == GUIEditor_Button[5] ) then url = guiGetText( GUIEditor_Edit[1] ) if url == '' or url == ' ' then outputChatBox('تأكد من وضع رابط صحيح', 255, 0, 0, false) return end if isElement( sound ) then outputChatBox('تم تشغيل الصوت من قبل', 255, 0, 0, false) return end triggerServerEvent('sRoot', localPlayer,url) elseif ( source == GUIEditor_Button[6] ) then if not isElement( sound ) then outputChatBox('لم يتم تشغيل الصوت', 255, 0, 0, false) return end triggerServerEvent('stop', localPlayer) elseif ( source == GUIEditor_Button[7] ) then triggerServerEvent('sptf', localPlayer) elseif ( source == GUIEditor_Button[8] ) then setPedFrozen ( localPlayer, false ) guiSetVisible(wnd,false) showCursor( false ) end end ) guiSetVisible(wnd,false) addEventHandler ("onClientMarkerHit", root, function( player ) if getElementType(player) == "player" and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == "[Pro]" then if( source == mArkSound ) then local xm, ym, zm = getElementPosition( localPlayer ) if not isPedInVehicle( localPlayer ) and zm < 116 and zm > 100 then if getPlayerSerial( localPlayer ) == 'F77D370EB766D26F55412E515564A903' then setPedFrozen ( localPlayer, true ) guiSetVisible(wnd,true) showCursor( true ) else outputChatBox('لوحة تشغيل خاصة لـ أنس', 255, 0, 0, false) end end end end end ) Link to comment
xX|KeMo|Xx Posted August 26, 2014 Share Posted August 26, 2014 المـآركر اتوقع يظبط معه هذا الفينكش isPedOnGround انا ما استخدمته مع ماركر من قبل بس جربهـ ان شاء الله يظبط هذا يتحقق انه الاعب لامس الارض ___ هات الدي بق Link to comment
#DRAGON!FIRE Posted August 26, 2014 Share Posted August 26, 2014 وسوي الحدث حث دخول الكول شيب وهكذا setElementParent استخدم الكول شيب افضل .. ولو تبي شكل الماركر سو الماركر وسوي الكول شيب واستخدم Link to comment
#DRAGON!FIRE Posted August 26, 2014 Share Posted August 26, 2014 عطنا اخطاء السكربت ذا ! Link to comment
xX|KeMo|Xx Posted August 26, 2014 Share Posted August 26, 2014 اضغط الزر وشوف في شيء بيطلع بالدي بق ولا لا Link to comment
Dr.Xen Posted August 26, 2014 Author Share Posted August 26, 2014 عطنا اخطاء السكربت ذا ! لو ضغطت زر مايصير شي ض1 Link to comment
nxFairlywell Posted August 26, 2014 Share Posted August 26, 2014 لو ضغطت زر مايصير شي ض1 وش يقلك بالدي بق يوم تضغط ! Link to comment
Dr.Xen Posted August 26, 2014 Author Share Posted August 26, 2014 يطلع كلام برتقالي .. + المشكلة لو غيرت الإحداثيات الماركر وضغطت على الأزرار ما تشتغل Link to comment
Dr.Xen Posted August 26, 2014 Author Share Posted August 26, 2014 شف الحين تمام .. لاكن لو سويت ملف جديد ماتشتغل الأزرار GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Edit = {} GUIEditor_Label = {} mArkSound = createMarker(1489.4000244141,541,22.39999961853, 'cylinder', 1.7000000476837, 225, 0, 0, 255 ) local xx,yy = guiGetScreenSize() local xx = xx - 396 local yy = yy - 161 wnd = guiCreateWindow(xx/2,yy/2,396,161,".: Sound System :. [Pro]",false) guiSetAlpha(wnd,1) guiWindowSetSizable(wnd,false) GUIEditor_Edit[1] = guiCreateEdit(10,22,328,24,"",false,wnd) GUIEditor_Label[1] = guiCreateLabel(340,22,48,24,"الرابط ",false,wnd) addEvent('okS', true) addEventHandler('okS', root, function(url) sound = playSound3D( url,1489.4000244141,541,22.39999961853) if sound then setSoundVolume ( sound, 400 ) setSoundMaxDistance(sound, 400) end end ) addEvent('okStop', true) addEventHandler('okStop', root, function() destroyElement( sound ) end ) addEvent('ptf', true) addEventHandler('ptf', root, function() if not isElement( sound ) then outputChatBox('لم يتم تشغيل الصوت', 255, 0, 0, false) return end if isSoundPaused(sound) then setSoundPaused(sound, false) outputChatBox(' تم استئناف الصوت ', 0, 255, 0, false) else setSoundPaused(sound, true) outputChatBox(' تم ايقاف الصوت مؤقت ', 0, 255, 0, false) end end ) GUIEditor_Button[8] = guiCreateButton(11,80,117,29,"اغلاق الوحة",false,wnd) GUIEditor_Button[5] = guiCreateButton(274,65,102,26,"تشغيل الصوت",false,wnd) GUIEditor_Button[6] = guiCreateButton(166,65,102,26,"ايقاف الصوت",false,wnd) GUIEditor_Button[7] = guiCreateButton(169,108,207,28,"ايقاف \ استئناف الصوت مؤقت",false,wnd) addEventHandler('onClientGUIClick', root, function() if ( source == GUIEditor_Button[5] ) then url = guiGetText( GUIEditor_Edit[1] ) if url == '' or url == ' ' then outputChatBox('تأكد من وضع رابط صحيح', 255, 0, 0, false) return end if isElement( sound ) then outputChatBox('تم تشغيل الصوت من قبل', 255, 0, 0, false) return end triggerServerEvent('sRoot', localPlayer,url) elseif ( source == GUIEditor_Button[6] ) then if not isElement( sound ) then outputChatBox('لم يتم تشغيل الصوت', 255, 0, 0, false) return end triggerServerEvent('stop', localPlayer) elseif ( source == GUIEditor_Button[7] ) then triggerServerEvent('sptf', localPlayer) elseif ( source == GUIEditor_Button[8] ) then setPedFrozen ( localPlayer, false ) guiSetVisible(wnd,false) showCursor( false ) end end ) guiSetVisible(wnd,false) addEventHandler ("onClientMarkerHit", root, function( player ) if getElementType(player) == "player" and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == "[Pro]" then if ( source == mArkSound ) then local xm, ym, zm = getElementPosition( localPlayer ) if not isPedInVehicle( localPlayer )then if getPlayerSerial( localPlayer ) == 'F77D370EB766D26F55412E515564A903' then setPedFrozen ( localPlayer, true ) guiSetVisible(wnd,true) showCursor( true ) else outputChatBox('لوحة تشغيل خاصة لـ أنس', 255, 0, 0, false) end end end end end ) Link to comment
King12 Posted August 29, 2014 Share Posted August 29, 2014 الخطأ اللي بالصوره مو موجود بآكوادك اللي بالمنتدى. Link to comment
Dr.Xen Posted August 29, 2014 Author Share Posted August 29, 2014 الخطأ اللي بالصوره مو موجود بآكوادك اللي بالمنتدى. ---=========لوحة سيارات GUIEditor_Grid = {} GUIEditor_Button = {} Vehicle = guiCreateWindow(453,218,302,379,".:[ Panel Vehicle For [XRG] ]:.",false) guiSetVisible(Vehicle,false) guiSetAlpha (Vehicle, 1) GUIEditor_Button[5] = guiCreateButton (0.0795,0.8575,0.4007,0.1135,"x[ oK ]x",true,Vehicle) GUIEditor_Button[4] = guiCreateButton (0.5166,0.8602,0.4007,0.1135,"x[ close ]x",true,Vehicle) GUIEditor_Grid[1] = guiCreateGridList(0.106,0.1214,0.7583,0.6887,true,Vehicle) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) local col = guiGridListAddColumn(GUIEditor_Grid[1],"Vehicle ",0.9) guiSetAlpha(GUIEditor_Grid[1],0.89999997615814) CarsTable = { { "Bullet" }, { "Infernus" }, { "Flash" }, { "Sultan" }, { "Bus" }, { "NRG-500" }, { "Banshee" }, { "Elegy" }, { "Cheetah" }, { "Turismo" }, { "Maverick" }, { "News Chopper" }, { "Sparrow" }, { "Banshee" }, { "Elegy" }, { "Cheetah" }, { "Turismo" }, { "Maverick" }, { "News Chopper" }, { "Sparrow" }, { "Mountain Bike" }, { "Jester" }, { "Kart" }, { "Banshee" }, { "Stretch" }, { "Hotring Racer 3" }, { "Vortex" }, { "StuntPlane" }, { "Remington" }, { "Monster 3" }, { "Dodo" }, { "Dumper" }, { "RC Bandit" }, { "Shamal" }, { "Uranus" }, } for i, v in ipairs ( CarsTable ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1, v[1], false, true ) end function onWaste() guiSetVisible(Vehicle, false) showCursor(false) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), onWaste) function OpenWindowsCar () guiSetVisible(Vehicle, true) showCursor(true) end addEvent("OpenWindowsWSR", true) addEventHandler("OpenWindowsWSR", getLocalPlayer(), OpenWindowsCar ) function createTheChoosenCar () local row = guiGridListGetSelectedItem(GUIEditor_Grid[1]) if row and row >= 0 then guiSetVisible(Vehicle, false) showCursor(false) triggerServerEvent("CreateCarWSR", localPlayer, guiGridListGetItemText(GUIEditor_Grid[1], row, col)) end end addEventHandler("onClientGUIClick", GUIEditor_Button[5], createTheChoosenCar , false) addEventHandler("onClientGUIClick",GUIEditor_Button[4], function () guiSetVisible(Vehicle,false) showCursor(false) end,false) addEvent("NssoR",true) addEventHandler("NssoR",root, function() setPedCanBeKnockedOffBike ( getLocalPlayer(), false ) end) addEvent("d5wl",true) addEventHandler("d5wl",root, function() setPedCanBeKnockedOffBike ( getLocalPlayer(), true ) end) addEvent("Tool",true) addEventHandler("Tool",root, function() setPedCanBeKnockedOffBike ( getLocalPlayer(), false ) end) addEvent("oooo",true) addEventHandler("oooo",root, function() setPedCanBeKnockedOffBike ( getLocalPlayer(), true ) 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