Naif Posted August 15, 2015 Share Posted August 15, 2015 addEventHandler('onClientGUIClick',root, function ( ) if ( source == pex ) then local veh = getPedOccupiedVehicle (localPlayer) if (veh) then if ( getVehicleOverrideLights(veh) ~= 2 ) then setVehicleOverrideLights(veh,2) outputChatBox("* تم تشغيل النور",0,255,0) else setVehicleOverrideLights(veh,1) outputChatBox("* تم إطفاء النور",255,0,0) end end end end ) Link to comment
☠ RaZeR ☠ Posted August 15, 2015 Author Share Posted August 15, 2015 مشكوور والله ,, تقدر اخوي تشوف ذا الكود ذا لو ضغط على الخريطه يوديني المكان اللي ضغط عليه لما اضغط يوديني على البحر ليه ؟؟ addEventHandler("onClientGUIDoubleClick", resourceRoot, function( ) if source == map then local x, y = getCursorPosition( ) x, y = x*6000, y*6000 setElementPosition(localPlayer, x, y, getGroundPosition(x, y, 500)+1) end end) Link to comment
Naif Posted August 15, 2015 Share Posted August 15, 2015 العفو حيأك الله , انا معي كود الفري روم حق المأب , بس العذر والسموحة ماهو لي , وهو أطول من سطر و كلنت وسيرفر .. Link to comment
☠ RaZeR ☠ Posted August 15, 2015 Author Share Posted August 15, 2015 طيب ماتقدر تصلح ذا ترا الكود ذا يبي بس تعديل في الحجم والارقام Link to comment
Naif Posted August 15, 2015 Share Posted August 15, 2015 شوف هاذا الكود بجانب سيرفر addEvent("spawnOnPosition", true) addEventHandler('spawnOnPosition', root, function (x, y, z) if getElementHealth ( source ) > 1 then if getPedOccupiedVehicle(source) then setElementPosition(getPedOccupiedVehicle(source), x, y, 0) setElementPosition(getPedOccupiedVehicle(source), x, y, z+3) else setElementPosition(source, x, y, 0) setElementPosition(source, x, y, z+3) end fadeCamera(source, true) else spawnPlayer(source, 0, 0, 3 ) setElementPosition(source, x, y, z+3) setCameraTarget (source, source) toggleAllControls(source, true, true, true) setPedStat(source, 160, 1000) setPedStat(source, 229, 1000) setPedStat(source, 230, 1000) fadeCamera(source, true) end end ) Link to comment
☠ RaZeR ☠ Posted August 15, 2015 Author Share Posted August 15, 2015 في الديبوق يقولي عرف في جانب السيرفر x,y,z addEventHandler("onClientGUIDoubleClick", resourceRoot, function( ) if source == map then local x, y = getCursorPosition( ) x, y = x*6000, y*6000 triggerServerEvent ( "spawnOnPosition", localPlayer) end end) addEvent("spawnOnPosition", true) addEventHandler('spawnOnPosition', root, function (x, y, z) if getElementHealth ( source ) > 1 then if getPedOccupiedVehicle(source) then setElementPosition(getPedOccupiedVehicle(source), x, y, 0) setElementPosition(getPedOccupiedVehicle(source), x, y, z+3) else setElementPosition(source, x, y, 0) setElementPosition(source, x, y, z+3) end fadeCamera(source, true) else spawnPlayer(source, 0, 0, 3 ) setElementPosition(source, x, y, z+3) setCameraTarget (source, source) toggleAllControls(source, true, true, true) setPedStat(source, 160, 1000) setPedStat(source, 229, 1000) setPedStat(source, 230, 1000) fadeCamera(source, true) 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