Jump to content

شكرا زاحف **


Recommended Posts

ارجواا حل المشكلة ابيه يشيل الكلام لكل اللاعبين مو اللاعب اللي لمس الماركر فقط

ويظهر لجميع اللاعبين

dxDrawText

"" اعتقد نغير الروت

ملاحظه : اللي اعرف ان الروت هي اللي تخلي يظهر لكل اللاعبين لاكن مدري وش صار

كلنت

addEvent("marker",true) 
addEventHandler("marker",root, 
function () 
   function H() 
        dxDrawText (getPlayerName(localPlayer).."has Taken " , 196, 0, 875, 163, tocolor( 255, 255, 255 ), 1.5, "pricedown",'left','top', false,false,false,true) 
    end 
addEventHandler("onClientRender",root, H) 
setTimer ( function() 
 removeEventHandler("onClientRender",root, H) 
end, 10000, 1 ) 
end 
) 

سيرفر

myMarker1 = createMarker(2488.80908, -1671.65955, 12.6, 'corona', 2.5, 255, 0, 0, 150) 
  
function MarkerHit(client) 
triggerClientEvent(client,"marker",client) 
end 
addEventHandler('onMarkerHit', myMarker1, MarkerHit)     

Link to comment

جرب :

addEvent( "dxText_", true ) 
addEventHandler( "dxText_", root, function (  ) 
   function txtRender (   ) 
        dxDrawText ( getPlayerName ( source ).."has Taken", 196, 0, 875, 163, tocolor( 255, 255, 255 ), 1.5, "pricedown", "left", "top", false, false, false, true ) 
   end 
   addEventHandler( "onClientRender", root, txtRender ) 
   setTimer ( function (   ) 
     removeEventHandler( "onClientRender", root, txtRender ) 
   end, 10000, 1 ) 
end ) 

myMarker1 = createMarker(2488.80908, -1671.65955, 12.6, 'corona', 2.5, 255, 0, 0, 150) 
  
addEventHandler ( "onMarkerHit", resourceRoot, function ( element ) 
 if ( source == myMarker1 ) then 
   if ( getElementType ( element ) == "player" ) then 
        triggerClientEvent ( root, "dxText_", element ) 
    end 
  end 
end )    
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...