+Source|> Posted April 7, 2019 Share Posted April 7, 2019 --client addEventHandler( "onClientGUIClick", root, function( ) if source == EmF1 then triggerServerEvent( "tServerE", localPlayer, "ttE1" ) end end ) function I1 () local myImage1 = dxCreateTexture( "Emoticons/EM1.png" ) dxDrawImageOnElement( localPlayer, myImage1 ) end addEvent( "startE1", true ) addEventHandler( "startE1", root, function() addEventHandler( "onClientRender", getRootElement(), I1 ) setTimer( function() removeEventHandler( "onClientRender", getRootElement(), I1 ) end, 5000, 1 ) end ) --server addEvent( "tServerE", true ) addEventHandler( "tServerE", root, function ( action ) for i, v in ipairs( getElementsByType( 'player' ) ) do if action == "ttE1" then triggerClientEvent( v, "startE1", v ) end end end ) ابي لما اللاعب يضغط زر يجي فوق راسه صوره يقدر يشوفها واللي قدامي يضدر يشوفها بعد كيف ؟ Link to comment
+Source|> Posted April 8, 2019 Author Share Posted April 8, 2019 UPPP Abdul KariM N3xT Link to comment
+Source|> Posted April 8, 2019 Author Share Posted April 8, 2019 6 hours ago, +Source|> said: UPPP Abdul KariM N3xT NX_CI 15 minutes ago, +Source|> said: NX_CI #Bad_Boy, Link to comment
Abdul KariM Posted April 8, 2019 Share Posted April 8, 2019 جرب ذا addEventHandler( "onClientGUIClick", root, function( ) if source == EmF1 then setElementData ( localPlayer , "showImg" , not getElementData ( localPlayer , "showImg" ) ) end end ) local myImage1 = dxCreateTexture( "Emoticons/EM1.png" ) addEventHandler ( "onClientRender" , root , function ( ) if getElementData ( localPlayer , "showImg" ) == true then for _ ,v in ipairs ( getElementsByType ( "player" ) ) do dxDrawImageOnElement( localPlayer, myImage1 ) end end end ) Link to comment
Guest Posted April 8, 2019 Share Posted April 8, 2019 (edited) 9 minutes ago, Abdul KariM said: dxDrawImageOnElement هذا الفنكشن جربته وما يزبط Edited April 8, 2019 by Guest Link to comment
Abdul KariM Posted April 8, 2019 Share Posted April 8, 2019 @DABL كيف مايزبط شوف المثال https://wiki.multitheftauto.com/wiki/DxDrawImageOnElement حتى حاط صورة للتوضيح شكلك ماتعرف تستخدمه وتقول مايزبط Link to comment
Guest Posted April 8, 2019 Share Posted April 8, 2019 Just now, Abdul KariM said: @DABL كيف مايزبط شوف المثال https://wiki.multitheftauto.com/wiki/DxDrawImageOnElement حتى حاط صورة للتوضيح شكلك ماتعرف تستخدمه وتقول مايزبط الظهار مشكلة ة من عندي وش بك معصب /= ؟ Link to comment
Abdul KariM Posted April 8, 2019 Share Posted April 8, 2019 @DABL مو معصب بس ردك داخل موب بمحله Link to comment
+Source|> Posted April 9, 2019 Author Share Posted April 9, 2019 20 hours ago, Abdul KariM said: جرب ذا addEventHandler( "onClientGUIClick", root, function( ) if source == EmF1 then setElementData ( localPlayer , "showImg" , not getElementData ( localPlayer , "showImg" ) ) end end ) local myImage1 = dxCreateTexture( "Emoticons/EM1.png" ) addEventHandler ( "onClientRender" , root , function ( ) if getElementData ( localPlayer , "showImg" ) == true then for _ ,v in ipairs ( getElementsByType ( "player" ) ) do dxDrawImageOnElement( localPlayer, myImage1 ) end end end ) ما اشتغل ابي الصوره تجي فوق راسي بس اللي قدامي ييشوفها فوق راسي انا Link to comment
Rakan# Posted April 10, 2019 Share Posted April 10, 2019 function dxDrawImageOnElement(TheElement,Image,distance,height,width,R,G,B,alpha) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local width = width or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawMaterialLine3D(x, y, z+1+height-(distanceBetweenPoints/distance), x, y, z+height, Image, width-(distanceBetweenPoints/distance), tocolor(R or 255, G or 255, B or 255, alpha or 255)) end end end end addEventHandler( "onClientGUIClick", root, function( ) if source == EmF1 then setElementData ( localPlayer , "showImg" , not getElementData ( localPlayer , "showImg" ) ) end end ) local myImage1 = dxCreateTexture( "Emoticons/EM1.png" ) addEventHandler ( "onClientRender" , root , function ( ) for _ ,v in ipairs ( getElementsByType ( "player" ) ) do if getElementData ( v , "showImg" ) == true then dxDrawImageOnElement( v, myImage1 ) end end end ) 1 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