xX|KeMo|Xx Posted February 4, 2013 Author Share Posted February 4, 2013 شو فايدة هذا for _, players in ipairs( getElementsByType( 'player' ) ) do شو معنى هذا break Link to comment
|Mr|-Talal07-| Posted February 5, 2013 Share Posted February 5, 2013 سويت تعديل بسيط اذا يبي يظهرها و يوخرها من نفس الزر local gScreenSize = { guiGetScreenSize( ) }; local gOffest = 0.4; local gIconWidth = 0.35 * gScreenSize[ 1 ]; local gHconHalfWidth = gIconWidth / 2; function renderTheHeadImg( ) for _, players in ipairs( getElementsByType( 'player' ) ) do while true do if not isElementOnScreen( players ) then break end local headX, headY, headZ = getPedBonePosition( players, 8 ); headZ = headZ + gOffest; local absX, absY = getScreenFromWorldPosition ( headX, headY, headZ ); if not absX or not absY then break end local camX, camY, camZ = getCameraMatrix( ); if not isLineOfSightClear ( camX, camY, camZ, headX, headY, headZ, true, false, false, true, false, true, false, players ) then break end dxDrawImages( absX, absY, 'img/1.png', tocolor( 255, 255, 255, 255 ), getDistanceBetweenPoints3D( camX, camY, camZ, headX, headY, headZ ) ); break end end end function dxDrawImages ( posX, posY, iconPath, color, distance ) distance = 1 / distance; dxDrawImage ( posX - gHconHalfWidth * distance, posY - gHconHalfWidth * distance, gIconWidth * distance, gIconWidth * distance, iconPath, 0, 0, 0, color, false ); end isShow = false addEventHandler ( 'onClientGUIClick', guiRoot, function( button, state, absoluteX, absoluteY ) if ( source == B1 ) then if isShow then removeEventHandler( 'onClientRender', root, renderTheHeadImg ); isShow = false else addEventHandler( 'onClientRender', root, renderTheHeadImg ); isShow = true end end end ) شكرآآ اخوي علىالمساعده بس ابي اعرف هذا يطلع للكل ولا للي ضغط على الزر بس وذا للكل ابيه للي ضغط على الزر بس للي ضغط الزر بس Link to comment
xX|KeMo|Xx Posted February 5, 2013 Author Share Posted February 5, 2013 جربته اخوي بس تيجي فوق الكل انا ابيه تيجي فوق الي ضغط على الزر وما يشوفها على الباقين والباقين يشوفها عليه Link to comment
xX|KeMo|Xx Posted February 6, 2013 Author Share Posted February 6, 2013 شباب اذا ابيه يجي فوق الي ظغط الزر ويظهر للكل يعني الي ضغط على الزر الصوره تكون فوقه والي ما ضغط عليه ما تكون فوقه والباقي يشوف انو فوقه صوره اسوي كذا؟ local gScreenSize = { guiGetScreenSize( ) }; local gOffest = 0.4; local gIconWidth = 0.35 * gScreenSize[ 1 ]; local gHconHalfWidth = gIconWidth / 2; function renderTheHeadImg( ) for _, players in ipairs( getElementsByType( 'player' ) ) do while true do if not isElementOnScreen( players ) then break end local headX, headY, headZ = getPedBonePosition( players, 8 ); headZ = headZ + gOffest; local absX, absY = getScreenFromWorldPosition ( headX, headY, headZ ); if not absX or not absY then break end local camX, camY, camZ = getCameraMatrix( ); if not isLineOfSightClear ( camX, camY, camZ, headX, headY, headZ, true, false, false, true, false, true, false, players ) then break end dxDrawImages( absX, absY, 'img/1.png', tocolor( 255, 255, 255, 255 ), getDistanceBetweenPoints3D( camX, camY, camZ, headX, headY, headZ ) ); break end end end function dxDrawImages ( posX, posY, iconPath, color, distance ) distance = 1 / distance; dxDrawImage ( posX - gHconHalfWidth * distance, posY - gHconHalfWidth * distance, gIconWidth * distance, gIconWidth * distance, iconPath, 0, 0, 0, color, false ); end isShow = false addEventHandler ( 'onClientGUIClick', guiRoot, function( button, state, absoluteX, absoluteY ) if ( source == B1 ) then if isShow then removeEventHandler( 'onClientRender', getRootElement, renderTheHeadImg ); isShow = false else addEventHandler( 'onClientRender', getRootElement, renderTheHeadImg ); isShow = true end end end ) Link to comment
xX|KeMo|Xx Posted July 10, 2014 Author Share Posted July 10, 2014 by xX|KeMo|Xx on Wed Jan 30, 2013 7:43 !! الموضوع له سنه وفي الاخر جاي تقولي حطه كلنت ض2 Link to comment
iMr.TZ[W]ER Posted July 10, 2014 Share Posted July 10, 2014 خخخخخخخخخخخخخ ادري انه له سنة بس ابيك تشوفه 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