AhmeD~9MoD Posted May 15, 2013 Share Posted May 15, 2013 (edited) شباب أبغى تصحيح للكود ز ... client side -- GUIEditor = { button = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(306, 10, 313, 120, "Light By AhmedSmood ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF22F905") GUIEditor.button[1] = guiCreateButton(9, 34, 113, 55, "Light On", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFAF703") GUIEditor.button[2] = guiCreateButton(190, 34, 113, 55, "Light Off", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") 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("F1", "down", OpenWin) addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor.button[1] ) then triggerServerEvent("light",getLocalPlayer(),true) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("light2",getLocalPlayer(),false) end end ) server side -- addEvent ( "light", true ) addEventHandler( "light", root, function( car ) setVehicleLightState ( car, 0, 1 ) end end) addEvent ( "light2", true ) addEventHandler( "light2", root, function( car2 ) setVehicleLightState ( car2, 0, 0 ) end end) Edited May 15, 2013 by Guest Link to comment
!#NssoR_) Posted May 15, 2013 Share Posted May 15, 2013 شوف السيرفر فيه اندات زايده جرب كذا addEvent ( "light", true ) addEventHandler( "light", root, function( car ) setVehicleLightState ( car, 0, 1 ) end) addEvent ( "light2", true ) addEventHandler( "light2", root, function( car2 ) setVehicleLightState ( car2, 0, 0 ) end) Link to comment
AhmeD~9MoD Posted May 15, 2013 Author Share Posted May 15, 2013 ابغى تصحيح ! يقول ان الأيفنت غير مضاف في ملف السيرفر ! . كيف ؟؟ Link to comment
iPrestege Posted May 15, 2013 Share Posted May 15, 2013 للمعلومية لازم تكون اضواء السياره شغاله عشان يشتغل المود ! -- # Client Side GUIEditor = { button = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(306, 10, 313, 120, "Light By AhmedSmood ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF22F905") GUIEditor.button[1] = guiCreateButton(9, 34, 113, 55, "Light On", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFAF703") GUIEditor.button[2] = guiCreateButton(190, 34, 113, 55, "Light Off", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") guiSetVisible (GUIEditor.window[1], false) bindKey("F1","down", function ( ) guiSetVisible ( GUIEditor.window[1] , not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) addEventHandler("onClientGUIClick",getRootElement(), function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("Lights",localPlayer,"On") elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("Lights",localPlayer,"Off") end end ) -- # Server Side Car = { } addEvent("Lights",true) addEventHandler("Lights",getRootElement(), function ( State ) Car[source] = getPedOccupiedVehicle( source ) if ( Car[source] ) then if ( State == "On" ) then for i = 0,3 do if ( getVehicleLightState ( Car[source],i ) == 0 ) then return outputChatBox("* You're vehicle light's is already working",source) end end for i = 0,3 do setVehicleLightState( Car[source],i,0 ) end elseif ( State == "Off" ) then for i = 0,3 do if ( getVehicleLightState ( Car[source],i ) == 1 ) then return outputChatBox("* You're vehicle light's is already not working",source) end end for i = 0,3 do setVehicleLightState( Car[source],i,1 ) end end end end ) Link to comment
AhmeD~9MoD Posted May 15, 2013 Author Share Posted May 15, 2013 للمعلومية لازم تكون اضواء السياره شغاله عشان يشتغل المود ! -- # Client Side GUIEditor = { button = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(306, 10, 313, 120, "Light By AhmedSmood ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF22F905") GUIEditor.button[1] = guiCreateButton(9, 34, 113, 55, "Light On", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFAF703") GUIEditor.button[2] = guiCreateButton(190, 34, 113, 55, "Light Off", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") guiSetVisible (GUIEditor.window[1], false) bindKey("F1","down", function ( ) guiSetVisible ( GUIEditor.window[1] , not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) addEventHandler("onClientGUIClick",getRootElement(), function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("Lights",localPlayer,"On") elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("Lights",localPlayer,"Off") end end ) -- # Server Side Car = { } addEvent("Lights",true) addEventHandler("Lights",getRootElement(), function ( State ) Car[source] = getPedOccupiedVehicle( source ) if ( Car[source] ) then if ( State == "On" ) then for i = 0,3 do if ( getVehicleLightState ( Car[source],i ) == 0 ) then return outputChatBox("* You're vehicle light's is already working",source) end end for i = 0,3 do setVehicleLightState( Car[source],i,0 ) end elseif ( State == "Off" ) then for i = 0,3 do if ( getVehicleLightState ( Car[source],i ) == 1 ) then return outputChatBox("* You're vehicle light's is already not working",source) end end for i = 0,3 do setVehicleLightState( Car[source],i,1 ) end end end end ) يقول ان الأيفنت غير مضاف إلى ملف السيرفر Link to comment
iPrestege Posted May 15, 2013 Share Posted May 15, 2013 ورني الميتا ومتاكد هذا المود كامل ؟ Link to comment
AhmeD~9MoD Posted May 15, 2013 Author Share Posted May 15, 2013 ورني الميتا ومتاكد هذا المود كامل ؟ meta -- "AhmedSmood" type="script" name="light"version="1.0"/> + متأكد انه الكود كاامل Link to comment
iPrestege Posted May 15, 2013 Share Posted May 15, 2013 يمكنك نسختة خطأ ؟ انسخهم ثانية / = ؟ Link to comment
AhmeD~9MoD Posted May 15, 2013 Author Share Posted May 15, 2013 يسلمووووو برستيججج .. ولله انك تستاهل افضل مبرمج عربي ضبط ! Link to comment
iPrestege Posted May 15, 2013 Share Posted May 15, 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