MhLoSs Posted July 14, 2013 Share Posted July 14, 2013 السلام عليكم كيف الحال ورمضان مبارك عليكم المهم انا عندي كود الانتقال بس ابي احدده لتيم معين حاولت حاولت حاولت ماعرفت هذا هو كودي markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ) addEventHandler ("onPlayerMarkerHit", root, function ( marker ) if ( marker == markerCH and getElementType ( source ) == "player" and not isPedInVehicle ( source ) ) then setElementPosition ( source, 2215.1999511719, -1150.5999755859, 1025.8000488281 ) setElementInterior ( source, 15 ) setElementDimension ( source, 15 ) end end ) اتمنى تساعدوني Link to comment
PaiN^ Posted July 14, 2013 Share Posted July 14, 2013 local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); addEventHandler( "onPlayerMarkerHit", root, function( marker ) if marker == markerCH and not isPedInVehicle( source ) then local _team = getPlayerTeam( source ); if _team and getTeamName( _team ) == "اسم الفريق" then setElementInterior( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension( source, 15 ); end end end ); Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 مشكووووووور اخوي طيب لو ابي كل بعد وقت يشتغل الماركر لمده ميعينه ويقفل يعني يفتح الماركر بعد 10 دقايق ويقفل بعد دقيتين ماعد ينقل Link to comment
PaiN^ Posted July 14, 2013 Share Posted July 14, 2013 جرب كذآ : local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); local _closeTime = 2 local _timers = { }; addEventHandler( "onPlayerMarkerHit", root, function( marker ) if marker == markerCH and not isPedInVehicle( source ) then local _team = getPlayerTeam( source ); if _team and getTeamName( _team ) == "اسم الفريق" then if _timers[ source ] and isTimer( _timers[ source ] ) then return outputChatBox( "! يجب أن تنتظر دقيقتين", source ); else setElementInterior( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension( source, 15 ); _timers[ source ] = setTimer( function( source ) _timers[ source ] = nil end, ( _closeTime * 1000 ) * 60, 1, source ) end end end end ); Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 جرب كذآ : local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); local _closeTime = 2 local _timers = { }; addEventHandler( "onPlayerMarkerHit", root, function( marker ) if marker == markerCH and not isPedInVehicle( source ) then local _team = getPlayerTeam( source ); if _team and getTeamName( _team ) == "اسم الفريق" then if _timers[ source ] and isTimer( _timers[ source ] ) then return outputChatBox( "! يجب أن تنتظر دقيقتين", source ); else setElementInterior( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension( source, 15 ); _timers[ source ] = setTimer( function( source ) _timers[ source ] = nil end, ( _closeTime * 1000 ) * 60, 1, source ) end end end end ); ماقصرت اخوي والف شكر لكن شكلك ما فهمت علي انا ابي يشتغل المود كل بعد 10 دقايق ينقل ويجلس دقيقتين ينقلهم بعد الدقيقتين معاد ينقل إلا بعد 10 دقايق Link to comment
3NAD Posted July 14, 2013 Share Posted July 14, 2013 لم يتم التجربة local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); local _closeTime = 10 local _openTime = 2 local _timers = { }; addEventHandler( "onPlayerMarkerHit", root, function ( marker ) if marker == markerCH and not isPedInVehicle( source ) then local _team = getPlayerTeam( source ); if _team then if getTeamName( _team ) == "اسم الفريق" then if checkMarkerData then if tostring ( checkMarkerData ) == "Lock" then outputChatBox ( "Marker Locked", source, 255, 0, 0, true ); return false end end setElementInterior ( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension ( source, 15 ); end end end end ); checkMarkerData = function ( marker ) if isElement ( marker ) then local Data = getElementData ( marker, "status" ) if Data then return Data end return false end end changeMarkerValue = function ( marker, value ) if isElement ( marker ) then if checkMarkerData then if tostring ( checkMarkerData ) ~= tostring ( value ) then setElementData ( marker, "status", value ) if tostring ( value ) == "UnLock" then if isTimer ( _timers [ marker ] ) then killTimer ( _timers [ marker ] ) end _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "Lock" ) elseif tostring ( value ) == "Lock" then if isTimer ( _timers [ marker ] ) then killTimer ( _timers [ marker ] ) end _timers [ marker ] = setTimer ( changeMarkerValue, _closeTime* 60* 1000, 1, markerCH, "UnLock" ) end return true end end setElementData ( marker, "status", value ) end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) changeMarkerValue ( markerCH, "Lock" ) _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "UnLock" ) end ) Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 لم يتم التجربة local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); local _closeTime = 10 local _openTime = 2 local _timers = { }; addEventHandler( "onPlayerMarkerHit", root, function ( marker ) if marker == markerCH and not isPedInVehicle( source ) then local _team = getPlayerTeam( source ); if _team then if getTeamName( _team ) == "اسم الفريق" then if checkMarkerData then if tostring ( checkMarkerData ) == "Lock" then outputChatBox ( "Marker Locked", source, 255, 0, 0, true ); return false end end setElementInterior ( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension ( source, 15 ); end end end end ); checkMarkerData = function ( marker ) if isElement ( marker ) then local Data = getElementData ( marker, "status" ) if Data then return Data end return false end end changeMarkerValue = function ( marker, value ) if isElement ( marker ) then if checkMarkerData then if tostring ( checkMarkerData ) ~= tostring ( value ) then setElementData ( marker, "status", value ) if tostring ( value ) == "UnLock" then if isTimer ( _timers [ marker ] ) then killTimer ( _timers [ marker ] ) end _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "Lock" ) elseif tostring ( value ) == "Lock" then if isTimer ( _timers [ marker ] ) then killTimer ( _timers [ marker ] ) end _timers [ marker ] = setTimer ( changeMarkerValue, _closeTime* 60* 1000, 1, markerCH, "UnLock" ) end return true end end setElementData ( marker, "status", value ) end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) changeMarkerValue ( markerCH, "Lock" ) _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "UnLock" ) end ) شكرا اخوي لكن فيه خطأ في _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "UnLock" ) Link to comment
iMr.Dawix~# Posted July 14, 2013 Share Posted July 14, 2013 لم يتم التجربة local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); local _closeTime = 10 local _openTime = 2 local _timers = { }; addEventHandler( "onPlayerMarkerHit", root, function ( marker ) if marker == markerCH and not isPedInVehicle( source ) then local _team = getPlayerTeam( source ); if _team then if getTeamName( _team ) == "اسم الفريق" then if checkMarkerData then if tostring ( checkMarkerData ) == "Lock" then outputChatBox ( "Marker Locked", source, 255, 0, 0, true ); return false end end setElementInterior ( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension ( source, 15 ); end end end end ); checkMarkerData = function ( marker ) if isElement ( marker ) then local Data = getElementData ( marker, "status" ) if Data then return Data end return false end end changeMarkerValue = function ( marker, value ) if isElement ( marker ) then if checkMarkerData then if tostring ( checkMarkerData ) ~= tostring ( value ) then setElementData ( marker, "status", value ) if tostring ( value ) == "UnLock" then if isTimer ( _timers [ marker ] ) then killTimer ( _timers [ marker ] ) end _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "Lock" ) elseif tostring ( value ) == "Lock" then if isTimer ( _timers [ marker ] ) then killTimer ( _timers [ marker ] ) end _timers [ marker ] = setTimer ( changeMarkerValue, _closeTime* 60* 1000, 1, markerCH, "UnLock" ) end return true end end setElementData ( marker, "status", value ) end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) changeMarkerValue ( markerCH, "Lock" ) _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "UnLock" ) end ) شكرا اخوي لكن فيه خطأ في _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "UnLock" ) وش الخطأ فيها؟ Link to comment
3NAD Posted July 14, 2013 Share Posted July 14, 2013 شكرا اخوي لكن فيه خطأ في _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "UnLock" ) ماشاء الله عليك ذكي طيب صلحها ولك الأجر Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 (edited) هههههههههههههههه انا اصلحها طيب ماينتظر 10 دقايق ع طول يدخل Edited July 14, 2013 by Guest Link to comment
3NAD Posted July 14, 2013 Share Posted July 14, 2013 _timers [ markerCH ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "UnLock" ) Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 برضو اخوي عناد ما ينقل ماينتظر 10 دقايق Link to comment
Bssol Posted July 14, 2013 Share Posted July 14, 2013 (edited) local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ) local _closeTime = 10 local _openTime = 2 local markerState = true function onPlayerMarkerHit ( marker ) if ( marker == markerCH ) and not ( isPedInVehicle( source ) ) then local _team = getPlayerTeam( source ) if ( _team ) and ( getTeamName( _team ) == "اسم الفريق" ) then if ( markerState ) then setElementInterior ( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ) setElementDimension ( source, 15 ) else outputChatBox ( "Marker Locked", source, 255, 0, 0, true ) end end end end addEventHandler( "onPlayerMarkerHit", root, onPlayerMarkerHit ) function updateMarkerState ( newState ) if ( newState ) then setTimer ( updateMarkerState, _openTime*60000, 1, false ) else setTimer ( updateMarkerState, _closeTime*60000, 1, true ) end markerState = newState end setTimer ( updateMarkerState, _openTime*60000, 1, false ) لم يتم التجربة... Edited July 14, 2013 by Guest Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ) local _closeTime = 10 local _openTime = 2 local markerState = true setTimer ( updateMarkerState, _openTime*60000, 1, false ) function onPlayerMarkerHit ( marker ) if ( marker == markerCH ) and not ( isPedInVehicle( source ) ) then local _team = getPlayerTeam( source ) if ( _team ) and ( getTeamName( _team ) == "اسم الفريق" ) then if ( markerState ) then setElementInterior ( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ) setElementDimension ( source, 15 ) else outputChatBox ( "Marker Locked", source, 255, 0, 0, true ) end end end end addEventHandler( "onPlayerMarkerHit", root, onPlayerMarkerHit ) function updateMarkerState ( newState ) if ( newState ) then setTimer ( updateMarkerState, _openTime*60000, 1, false ) else setTimer ( updateMarkerState, _closeTime*60000, 1, true ) end markerState = newState end لم يتم التجربة... اشكرك اخوي لكن المود كله معاد يشتغل والخطأ هو في setTimer ( updateMarkerState, _openTime*60000, 1, false ) Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 تم التصحيح في الرد الاول ذذ اشكرك مره ثانيه لكن ماينتظر ع طول ينقلك Link to comment
Bssol Posted July 14, 2013 Share Posted July 14, 2013 سويته لك اول ما يشتغل المود يكون مفتوح النقل، وبعد دقيقتين يسكر وما يفتح الا بعد 10 دقايق انت تبيه العكس، يعني اول شي مقفل بعدين يفتح ولا وش؟ Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 سويته لك اول ما يشتغل المود يكون مفتوح النقل، وبعد دقيقتين يسكر وما يفتح الا بعد 10 دقايق انت تبيه العكس، يعني اول شي مقفل بعدين يفتح ولا وش؟ يب يب يصدقت انا كنت اضن العكس الف الف الف الف شكر Link to comment
MhLoSs Posted July 14, 2013 Author Share Posted July 14, 2013 حياك الله وبالتوفيق لك ذذ الله آمين وياك حبيبي لكن عندي طلب أخير ابي اذا بدأ من جديد تجي رساله مكتوب فيها ماركر الانتقال بدأ Link to comment
فاّرس Posted July 14, 2013 Share Posted July 14, 2013 سوي تايمر وبعد 10 دقايق يظهر الرساله , Link to comment
AHMAD1234 Posted July 14, 2013 Share Posted July 14, 2013 الرسالة openTime حط مكان الـ Link to comment
3NAD Posted July 14, 2013 Share Posted July 14, 2013 برضو اخوي عناد ما ينقل ماينتظر 10 دقايق local markerCH = createMarker ( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); local _closeTime = 10 local _openTime = 2 local _timers = { }; addEventHandler( "onMarkerHit", markerCH, function ( player ) if getElementType ( player ) == "player" then if not isPedInVehicle ( player ) then local _team = getPlayerTeam ( player ); if _team then if _team == getTeamFromName ( "Police" ) then if checkMarkerData ( source ) == "Lock" then outputChatBox ( "Marker Locked", player, 255, 0, 0, true ); return false end setElementInterior ( player, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension ( player, 15 ); end end end end end , false ); checkMarkerData = function ( marker ) if isElement ( marker ) then local Data = getElementData ( marker, "status" ) if Data then return Data end return "n/a" end end changeMarkerValue = function ( marker, value ) if isElement ( marker ) then if isTimer ( _timers [ marker ] ) then killTimer ( _timers [ marker ] ) end setElementData ( marker, "status", value ) if tostring ( value ) == "UnLock" then outputChatBox ( "Marker Opened", root, 255, 255, 0, true ) _timers [ marker ] = setTimer ( changeMarkerValue, _openTime* 60* 1000, 1, markerCH, "Lock" ) elseif tostring ( value ) == "Lock" then outputChatBox ( "Marker Closed", root, 255, 255, 0, true ) _timers [ marker ] = setTimer ( changeMarkerValue, _closeTime* 60* 1000, 1, markerCH, "UnLock" ) end end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) changeMarkerValue ( markerCH, "Lock" ) _timers [ markerCH ] = setTimer ( changeMarkerValue, _closeTime* 60* 1000, 1, markerCH, "UnLock" ) end ) Link to comment
فاّرس Posted July 14, 2013 Share Posted July 14, 2013 مدري ليه مصعبين السالفه ذذ, جرب كذا , إن شاء الله يشتغل setTimer(outputChatBox,600000,0,'ماركر الانتقال بدأ',root,255,255,0,true) local markerCH = createMarker( 1535.5216064453, -1685.9595947266, 12.55108, "cylinder", 1.4, 255, 255, 255, 255 ); STAT = true addEventHandler( "onPlayerMarkerHit", root, function( marker ) if marker == markerCH and not isPedInVehicle( source ) then local Team = getPlayerTeam( source ); if Team and getTeamName( Team ) == 'اسم الفريق' then if STAT == true then setElementInterior( source, 15, 2215.1999511719, -1150.5999755859, 1025.8000488281 ); setElementDimension( source, 15 ); STAT = false else outputChatBox('* Please wait 10 minutes !',source,255,255,0,true) STAT = nil end end end end ); setTimer(function() STAT = true end,600000,0 ) setTimer(function() STAT = false end,120000,0 ) Link to comment
MhLoSs Posted July 15, 2013 Author Share Posted July 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