Jump to content

جبوهـ لي


Recommended Posts

السلام عليكم

ابيكم شباب تجيبون لي الكود هاذا كامل من تحت الاَرض

مكان الكتابة الي فوق الماركر

كود PHP:

Marker = createMarker (2483.09277, -1663.10498, 13.33595, "cylinder" ,0) 
setElementData(Marker,"message","[حيآك في ورشة السيرفر]")  

Link to comment

addEventHandler( "onClientRender", root, function ( ) 
        local CameraMX, CameraMY, CameraMZ = getCameraMatrix( ) 
        local Mx, My, Mz = getElementPosition( marker ) 
          if ( getDistanceBetweenPoints3D( Mx, My, Mz, CameraMX, CameraMY, CameraMZ ) <= 15 ) then 
             local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( Mx, My, Mz +1, 0.06 ) 
               if ( WorldPositionX and WorldPositionY ) then 
                 dxDrawText ( "Text", WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, tocolor(255,0,0,255), 2, "arial" ) 
             end 
       end 
end ) 
Link to comment

جبته من تحت الارض :

function renderIng( ) 
local x, y, z = getCameraMatrix( ) 
local dimension = getElementDimension( localPlayer ) 
for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do 
if getElementDimension( marker ) == dimension then 
local px, py, pz = getElementPosition( marker ) 
local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) 
if distance <= 20 then 
local text = getElementData( marker, "message" )     
if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then 
local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) 
if sx and sy then 
local w = dxGetTextWidth( tostring( text ) ) 
local h = ( text and 3 or 1 ) * dxGetFontHeight( ) 
  
dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 0, 255, 255 ), 3, "Tahoma", "center", "center" ) 
end 
end 
end 
end 
end 
end 
addEventHandler( "onClientRender", getRootElement( ),renderIng) 
  
Marker = createMarker (2483.09277,  -1663.10498, 13.33595, "cylinder" ,0) 
setElementData(Marker,"message","[حيآك في ورشة السيرفر]") 

الكود مب لي انا افقط جبته لك !

Link to comment
جبته من تحت الارض :
function renderIng( ) 
local x, y, z = getCameraMatrix( ) 
local dimension = getElementDimension( localPlayer ) 
for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do 
if getElementDimension( marker ) == dimension then 
local px, py, pz = getElementPosition( marker ) 
local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) 
if distance <= 20 then 
local text = getElementData( marker, "message" )     
if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then 
local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) 
if sx and sy then 
local w = dxGetTextWidth( tostring( text ) ) 
local h = ( text and 3 or 1 ) * dxGetFontHeight( ) 
  
dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 0, 255, 255 ), 3, "Tahoma", "center", "center" ) 
end 
end 
end 
end 
end 
end 
addEventHandler( "onClientRender", getRootElement( ),renderIng) 
  
Marker = createMarker (2483.09277,  -1663.10498, 13.33595, "cylinder" ,0) 
setElementData(Marker,"message","[حيآك في ورشة السيرفر]") 

الكود مب لي انا افقط جبته لك !

أنت روعة دورت على الكود كثير وهسه لقيتو

بس المشكله ما أبي الماركر أزرق أبي شفاف

Link to comment

اصح الكود ذا قصدي كان فيه يسوي تيم تومتيك ويدخلونة اول ما يدخلو السيرفر

team = createTeam ( "Zombies Killer", 3, 255, 0 ) 
  
  
setTeamFriendlyFire ( getTeamFromName( "Zombies Killer" ), false ) 
      
addEventHandler( "onPlayerJoin", root, function(  ) 
setPlayerTeam( source, getTeamFromName( "Zombies Killer" ) ) 
end ) 

Link to comment
اصح الكود ذا قصدي كان فيه يسوي تيم تومتيك ويدخلونة اول ما يدخلو السيرفر
team = createTeam ( "Zombies Killer", 3, 255, 0 ) 
  
  
setTeamFriendlyFire ( getTeamFromName( "Zombies Killer" ), false ) 
      
addEventHandler( "onPlayerJoin", root, function(  ) 
setPlayerTeam( source, getTeamFromName( "Zombies Killer" ) ) 
end ) 

function Everyone1 () 
Everyone = createTeam ( "Zombie Killer", 255, 255, 255 ) 
end 
addEventHandler("onResourceStart", resourceRoot, Everyone1) 
function setEveryone() 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then 
   setPlayerTeam(source, Everyone) 
   end 
end 
addEventHandler("onPlayerLogin",getRootElement(),setEveryone) 

Link to comment
واذا ماليقتة وش الحل

سويت اضافة اذا صار سباون للاعب بعد ثانيتين يحطة بالتيم :

local theTeam = createTeam ( 'Zombies Killer', 3, 255, 0 ) 
setTeamFriendlyFire ( theTeam,false ) 
  
      
addEventHandler( 'onPlayerJoin', root, 
 function(  ) 
    if theTeam then 
           setPlayerTeam( source,theTeam ) 
      end 
  end 
) 
  
  
addEventHandler ( 'onPlayerSpawn',root, 
    function (      ) 
        setTimer ( setPlayerTeam,2000,1,source,theTeam ) 
    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...