z24d Posted September 20, 2015 Share Posted September 20, 2015 الموضوع من عنوانه mynigga = createMarker(-2039.20020, 178.75835, 28.14509,"cylinder",15,255,255,0,0) addEventHandler ( "onMarkerHit", root, function ( ) if ( source == mynigga ) then bindKey ( source, "tab", "down", garage ) end end ) addEventHandler ( "onMarkerLeave", root, function ( ) if ( source == mynigga ) then unbindKey ( source, "tab", "down", garage ) end end ) وين الغلط؟ الديبوق يطلع الغلط بال bindKey and unbindKey Link to comment
' A F . Posted September 20, 2015 Share Posted September 20, 2015 marker = createMarker(-2039.20020, 178.75835, 28.14509,"cylinder",15,255,255,0,0) bindKey('tab','down', function ( ) if ( isElementWithinMarker ( getLocalPlayer(),marker ) ) then -- Your Code end end) سويهأ بهاذي الطريقه آحسسسن , Link to comment
z24d Posted September 20, 2015 Author Share Posted September 20, 2015 لاياخوي الكود اول شيء سيرفر ثاني شيء انا مسوي فنكش garage وابيه يسويله BindKey اذا لمس الماركر وذا طلع منه يسويله unbindKey Link to comment
Jupi Posted September 20, 2015 Share Posted September 20, 2015 O = createMarker(-2039.20020, 178.75835, 28.14509,"cylinder",15,255,255,0,0) addEventHandler ( "onMarkerHit", root, function ( ) if ( source == O ) then bindKey ( source, "tab", "down", garage ) end end ) addEventHandler ( "onMarkerLeave", root, function ( ) if ( source == O ) then unbindKey ( source, "tab", "down", garage ) end end ) Link to comment
z24d Posted September 20, 2015 Author Share Posted September 20, 2015 الكود غلط الكود كامل addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function() createObject(11388, -2048.216796875, 166.73092651367, 34.468391418457, 0.000000, 0.000000, 0.000000) -- createObject(11389, -2048.1174316406, 166.71966552734, 30.975694656372, 0.000000, 0.000000, 0.000000) -- createObject(11390, -2048.1791992188, 166.76277160645, 32.235980987549, 0.000000, 0.000000, 0.000000) -- createObject(11391, -2056.2062988281, 158.56985473633, 29.087089538574, 0.000000, 0.000000, 0.000000) -- createObject(11392, -2047.8289794922, 167.54446411133, 27.835615158081, 0.000000, 0.000000, 0.000000) -- createObject(11393, -2043.5166015625, 161.337890625, 29.320350646973, 0.000000, 0.000000, 0.000000) -- createObject(2893, -2050.9521484375, 171.15930175781, 29.11247253418, 7.9400024414063, 0.000000, 89.450988769531) -- createObject(2893, -2050.9458007813, 169.32849121094, 29.112930297852, 7.9376220703125, 0.000000, 89.45068359375) -- local tow = createVehicle(562, -2052.4907226563, 154.04287719727, 28.589487075806, 0, 0, 0, "Taller") addVehicleUpgrade ( tow, 1010 ) setVehicleDamageProof( tow, true) setVehicleIdleRespawnDelay ( tow, 10000 ) tallerSF = false end ) function puerta(toggle) if toggle == true then setGarageOpen(22,true) SFgarage = true end if toggle == false then setGarageOpen(22,false) SFgarage = false end end function garage(source) local jugador = getPlayerName(source) -- outputDebugString ( jugador.." ha usado el comando del taller" ) if SFgarage == true then puerta(false) else puerta(true) end end addCommandHandler( "sfgarage", garage, source) O1 = createMarker(-2039.20020, 178.75835, 28.14509,"cylinder",15,255,255,0,0) addEventHandler ( "onMarkerHit", root, function ( ) if ( source == O1 ) then bindKey ( source, "tab", "down", garage ) end end ) addEventHandler ( "onMarkerLeave", root, function ( ) if ( source == O1 ) then unbindKey ( source, "tab", "down", garage ) end end ) Link to comment
Jupi Posted September 20, 2015 Share Posted September 20, 2015 الخطأ بكود الماركر هو السورس كيف تبي تسوي بيند للماركر يعني انت الحين تبي الماركر لما يضغط علي الزر Link to comment
z24d Posted September 20, 2015 Author Share Posted September 20, 2015 انا سويت اذا لمس الماركر انا حددت الماركر ب source == O1 يعني مو اي ماركر يلمسه بس ماركر الي سويته فهمت Link to comment
Jupi Posted September 20, 2015 Share Posted September 20, 2015 انا سويت اذا لمس الماركر انا حددت الماركر بsource == O1 يعني مو اي ماركر يلمسه بس ماركر الي سويته فهمت يب تمام ها الجزء انا اتكلم عن bindKey Link to comment
#DRAGON!FIRE Posted September 20, 2015 Share Posted September 20, 2015 = createMarker(-2039.20020, 178.75835, 28.14509,"cylinder",15,255,255,0,0) addEventHandler ( "onMarkerHit", resourceRoot, function ( element ) if ( getElementType ( element ) == "player" and not isPedInVehicle ( element ) ) then if ( source == ) then bindKey ( element, "tab", "down", garage ) end end end ) addEventHandler ( "onMarkerLeave", resourceRoot, function ( element ) if ( getElementType ( element ) == "player" and not isPedInVehicle ( element ) ) then if ( source == ) then unbindKey ( element, "tab", "down", garage ) end end end ) Link to comment
jafar Posted September 21, 2015 Share Posted September 21, 2015 = createMarker(-2039.20020, 178.75835, 28.14509,"cylinder",15,255,255,0,0) addEventHandler ( "onMarkerHit", resourceRoot, function ( element ) if ( getElementType ( element ) == "player" and not isPedInVehicle ( element ) ) then if ( source == ) then bindKey ( element, "tab", "down", garage ) end end end ) addEventHandler ( "onMarkerLeave", resourceRoot, function ( element ) if ( getElementType ( element ) == "player" and not isPedInVehicle ( element ) ) then if ( source == ) then unbindKey ( element, "tab", "down", garage ) end end end ) إسم الماركر خطأ احذف ':' من اسم الماركر Link to comment
z24d Posted September 21, 2015 Author Share Posted September 21, 2015 انا كنت حاط اسمه انا كنت حاط my:ni:gga بالانقليزي وبدون : لكن تحولت O: 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