Doffy Posted February 10, 2017 Share Posted February 10, 2017 ابي اول ما اللاعب يضغط زر تنقفل سيارته ومافي احد يقدر يدخل سيارته ويكتبله رسالة في ال TopBarChat محاولتي الاولي --Client addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[3] ) then triggerServerEvent("lock",localPlayer) end end) --Server addEvent("lock",true) addEventHandler("lock",root, function() local theVehicle2 = getPedOccupiedVehicle ( client ) if ( theVehicle2 ) then if isVehicleLocked ( theVehicle2 ) then setVehicleLocked ( theVehicle2, false ) outputChatBox("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true) end end end) مو شغاله الي يعرف ياليت يفدني Link to comment
Ahmed Ly Posted February 10, 2017 Share Posted February 10, 2017 --Client addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[3] ) then triggerServerEvent("lock",localPlayer) end end ) --Server addEvent("lock",true) addEventHandler("lock",root, function() local theVehicle = getPedOccupiedVehicle(source) if ( theVehicle ) then if not isVehicleLocked ( theVehicle ) then setVehicleLocked(theVehicle,true) outputChatBox("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true) end end end ) Link to comment
Doffy Posted February 10, 2017 Author Share Posted February 10, 2017 21 minutes ago, Ahmed Ly said: --Client addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[3] ) then triggerServerEvent("lock",localPlayer) end end ) --Server addEvent("lock",true) addEventHandler("lock",root, function() local theVehicle = getPedOccupiedVehicle(source) if ( theVehicle ) then if not isVehicleLocked ( theVehicle ) then setVehicleLocked(theVehicle,true) outputChatBox("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true) end end end ) طيب ولو ابيها تنفتح اول ما يضغط نفس الزر مره ثانية ؟؟ Link to comment
Ahmed Ly Posted February 10, 2017 Share Posted February 10, 2017 (edited) addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[3] ) then triggerServerEvent("lock",localPlayer) end end ) --Server addEvent("lock",true) addEventHandler("lock",root, function() theVehicle = getPedOccupiedVehicle(source) if ( theVehicle ) then if not isVehicleLocked ( theVehicle ) then setVehicleLocked(theVehicle,true) exports["TopBarChat"]:sendClientMessage("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true) else setVehicleLocked(theVehicle,false) exports["TopBarChat"]:sendClientMessage("#000000[#FFFF00 Ranks System#000000] #00FF00 تم فتح السيارة", source,255,255,255, true) end end end ) Edited February 10, 2017 by Ahmed Ly 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