Jump to content

تم الإفآدة | Thx Mr.Pres[T]ege


Recommended Posts

شباب أبغى تصحيح للكود ز ...

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 by Guest
Link to comment

شوف السيرفر فيه اندات زايده

جرب كذا

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

للمعلومية لازم تكون اضواء السياره شغاله عشان يشتغل المود !

-- # 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
للمعلومية لازم تكون اضواء السياره شغاله عشان يشتغل المود !

-- # 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 
) 

يقول ان الأيفنت غير مضاف إلى ملف السيرفر :shock:

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...