aL.Kfo Posted July 25, 2015 Share Posted July 25, 2015 (edited) ألـسلام عليكم ورحمة الله كيفكم اخـوأني بكل اختصار هذا كودي لاخفاء العلامة المحددة رقمها بالاسفل عند الخروج من تيم المحدد باختصار تدمير رمز رقم [40] ب [Mfls3] عند خروجة من تيم function pilotBlip (modelID) local blip = getElementsByType("blip") for i,v in ipairs(blip) do if getPlayerTeam(v) == getTeamName ("Mfls3") then if (getElementModel(v) == modelID) then destroyElement(v) end end end pilotBlip (40) Edited July 25, 2015 by Guest Link to comment
Simple. Posted July 25, 2015 Share Posted July 25, 2015 هذي آسهل setElementVisibleTo لكن تفضل function DestroyBlip ( id, team ) if id ~= "" and team ~= "" and tonumber ( id ) and team then for k,v in ipairs ( getElementsByType ( "player" ) ) do if getPlayerTeam ( v ) ~= getTeamFromName ( team ) then for _,Blips in ipairs ( getElementsByType ("blip")) do if getBlipIcon ( Blips ) == id then if isElement ( Blips ) then destroyElement ( Blips ) end end end end end end end -- Example addCommandHandler ( "DestroyBlips", function ( player, cmd, id, team ) if id and team then DestroyBlip ( id, team ) outputChatBox ( getPlayerName ( player ).." Destroy Blips ", root, 128, 128, 0 ) end end) Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 يعطيكك العافية بكمل غداي وبجرب وبرد لك Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 ما ضبط مدري الخطاء من تعديلي ولا الكود فيه مشكلة Link to comment
Simple. Posted July 25, 2015 Share Posted July 25, 2015 وش يطلع بالديبوق ؟ وورني كودك الي سويته Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 function DestroyBlip ( id, team ) if id ~= "" and team ~= "" and tonumber ( id ) and team then for k,v in ipairs ( getElementsByType ( "player" ) ) do if getPlayerTeam ( v ) ~= getTeamFromName ( mFlS3 ) then for _,Blips in ipairs ( getElementsByType ("blip")) do if getBlipIcon ( Blips ) == 41 then if isElement ( Blips ) then destroyElement ( Blips ) end end end end end end end Link to comment
Simple. Posted July 25, 2015 Share Posted July 25, 2015 هذي آسهل setElementVisibleTo لكن تفضل function DestroyBlip ( id, team ) if id ~= "" and team ~= "" and tonumber ( id ) and team then for k,v in ipairs ( getElementsByType ( "player" ) ) do if getPlayerTeam ( v ) ~= getTeamFromName ( team ) then for _,Blips in ipairs ( getElementsByType ("blip")) do if getBlipIcon ( Blips ) == id then if isElement ( Blips ) then destroyElement ( Blips ) end end end end end end end -- Example addCommandHandler ( "DestroyBlips", function ( player, cmd, id, team ) if id and team then DestroyBlip ( id, team ) outputChatBox ( getPlayerName ( player ).." Destroy Blips ", root, 128, 128, 0 ) end end) لاتعدل عالكود الي فوق اذا تبي تحذفها DestroyBlip ( 40, Mfls3 ) الكود الي فوق لاتجيه Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 اخوي ذا امر اف 8 صح ؟ مو كذا قصدي Link to comment
Simple. Posted July 25, 2015 Share Posted July 25, 2015 انا عطيتك مثال انت عدل عليه !! Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 انا عطيتك مثال انت عدل عليه !! طيب عطني الحدث وبكمل الباقي Link to comment
Simple. Posted July 25, 2015 Share Posted July 25, 2015 مافيه حدث لما يخرج من تيم او يغير تيمه باللعبه لكن هذا مسويه واحد حدث لما يتغير التيم _setPlayerTeam = setPlayerTeam addEvent( "onPlayerChangeTeam", true ) function setPlayerTeam ( thePlayer, theTeam ) if not thePlayer or not theTeam then return false end local oldTeam = getPlayerTeam( thePlayer ) triggerEvent ( "onPlayerChangeTeam", thePlayer, theTeam, oldTeam ) return _setPlayerTeam ( thePlayer, theTeam ) end addEventHandler ( "onPlayerChangeTeam", root, function ( theNewTeam, theOldTeam ) local teamName = getTeamName( theNewTeam ) if teamName ~= "Criminal" then destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) end end ) Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 مدري الاكواد ذي ماتضبط ولا الغلط مني انا قلت لا طلعت من تيم محدد تختفي العلانة رقم 40 بانتظار الافادة Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 قول تبي الاكواد جاهزه وريحنا ياليت لني سهران مافيني وجع راس الويكي .. ولا هات الفنكشات واسويها لا صحيت وتصححونها لو بها شي Link to comment
Simple. Posted July 25, 2015 Share Posted July 25, 2015 سو لوب لجميع اللاعبين وجيب اللاعبين الي تيمهم mfls3 وخل لهم البليب ظاهر setElementVisibleTo Link to comment
aL.Kfo Posted July 25, 2015 Author Share Posted July 25, 2015 الوظيفه الان لا ادخل وظيفته يطلع البلب .. ابي لا خرج من الوظيفه يروح البلب وانت تقول وخل لهم البليب ظاهر ! سوية طيب وهاته Link to comment
Simple. Posted July 25, 2015 Share Posted July 25, 2015 ياخي الفنكشن الي عطيتك اياه يخلي البلب للتيم الي انت تبيه غير تيمه يروح رجع للتيم يرجع ! Link to comment
aL.Kfo Posted July 26, 2015 Author Share Posted July 26, 2015 (edited) مازبطط function Blip () if getPlayerTeam(Blip) = getTeamName ("11") then Blip = setElementVisibleTo ( Player, Blip ) end end Edited July 26, 2015 by Guest Link to comment
</Mr.Tn6eL> Posted July 26, 2015 Share Posted July 26, 2015 blip createBlip ( float x, float y, float z [, int icon = 0, int size = 2, int r = 255, int g = 0, int b = 0, int a = 255, int ordering = 0, float visibleDistance = 99999.0, visibleTo = getRootElement( )] ) Link to comment
aL.Kfo Posted July 26, 2015 Author Share Posted July 26, 2015 بانتظار الحل لم تتم الافادة Link to comment
Simple. Posted July 26, 2015 Share Posted July 26, 2015 لو تفهم الي عطيناك اياه بتلقى الحل 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