Jump to content

عدد الي بل ماركر


Recommended Posts

السلام عليكم

شباب ابي مثلا

اسوي ماركر كبير حجمه مثلا 200

والي يلمس الماركر

يجيه لبل

فوق الخريطه

ويقوله العدد

1 يعني فيه لاعب واحد داخل الماركر حاليا

واذا خرج من الماركر يروح البل +

ينقص العدد الي بـ البل

لو 10 لمسو الماركر

يجي فوق الخريطه عدد الاعبين 10

وااذ مات واحد

يتغير العدد

يصير 9

وكذا وان شاءالله فهمتوني

Link to comment
  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

createMarker 
getElementType 
isElementWithinMarker 
getMarkerCount 
guiSetText 
guiSetVisible 
guiCreateLabel 

onClientMarkerHit

onClientMarkerLeave

onClientRender

getMarkerCount 

ما لها داعي مره

تبي تجيب كم واحد في الماركر استخدم ذي الوظيفه

function getPlayersInMarker(marker) 
    local players = 0 
    if marker and getElementType(marker) == "marker" then 
        for i,player in ipairs(getElementsByType("player")) do 
            if isElementWithinMarker(player,marker) then 
                players = players + 1 
            end 
        end 
    end 
    return players 
end 

Link to comment

كيف اسوي الـ

dx

بلـ Gui

؟

+

سويت كذا عجزت اسويه بـ dx

بجرب اسويه شااات

سويت كذا وماضبط

marker = createMarker ( 2055.71143, 1534.98535, 9.67188, "cylinder", 5, 0, 0, 0, 255 ) 
  
  
  
function getPlayersInMarker(marker) 
    local players = 0 
    if marker and getElementType(marker) == "marker" then 
        for i,player in ipairs(getElementsByType("player")) do 
            if isElementWithinMarker(player,marker) then 
                players = players + 1 
                outputChatBox(players.." العدد", player, 255, 255, 255, true ) 
            end 
         end 
    end 
    return players 
end 

Link to comment

لم يتم التجربة

function getPlayersInMarker(marker) 
    local players = 0 
    if marker then 
        if isElement ( marker ) and getElementType ( marker ) == "marker" then 
            for i, player in ipairs ( getElementsByType ( "player" ) ) do 
                if isElementWithinMarker ( player, marker ) then 
                    players = players +1 
                end 
            end 
        end 
    end 
    return players 
end 
  
addCommandHandler ( "aa", 
    function ( player ) 
        outputChatBox ( getPlayersInMarker ( marker ).." العدد", player, 255, 255, 0, true ) 
    end 
) 

Link to comment

مشكووورين حملته + سويت الـ دي اكس

بس الحين هذا هوو

  
addEventHandler("onClientResourceStart", resourceRoot, 
    function()     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("players in marker : ", 11, 492, 353, 598, tocolor(0, 0, 0, 255), 3.00, "default-bold", "center", "center", false, false, true, false, false) 
        dxDrawText("players in marker : ", 11, 490, 353, 596, tocolor(0, 0, 0, 255), 3.00, "default-bold", "center", "center", false, false, true, false, false) 
        dxDrawText("players in marker : ", 9, 492, 351, 598, tocolor(0, 0, 0, 255), 3.00, "default-bold", "center", "center", false, false, true, false, false) 
        dxDrawText("players in marker : ", 9, 490, 351, 596, tocolor(0, 0, 0, 255), 3.00, "default-bold", "center", "center", false, false, true, false, false) 
        dxDrawText("players in marker : ", 10, 491, 352, 597, tocolor(165, 66, 11, 255), 3.00, "default-bold", "center", "center", false, false, true, false, false) 
    end 
) 

كيف اخليه يجيب العدد حق الماركر ؟؟؟؟

+ انا حطيت الكلام فوق الرادار

بس لو يجي واحد ثاني بيشوف الدي اكس

بنص الشاشه مو زي الي اشوفه ليييه ؟

Link to comment
Sent: Sun Apr 07, 2013 7:09 pm

From: Solidsnake14

To: #Mr.Pres[T]ege

function RelativeToAbsolute( X, Y ) 
        local rX, rY = guiGetScreenSize() 
        local x = X*rX 
        local y = Y*rY 
        return x, y 
end 

That'll convert relative positions to absolute.

E.g: 0.5, 0.50.

مثال :

addEventHandler("onClientRender",getRootElement(), 
    function ( ) 
    local x,y = RelativeToAbsolute ( 0.5,0.5 ) 
        dxDrawText ( "iMr.Prestege",x,y ) 
    end 
) 
Link to comment
بس البل

خطوطه مو حلوه

الدي اكس احلا وكانه يعني الخط كانه واقعي يعني افضل من البل

ومافهمت

علي زيد 1 ونقص 1

ي ليت توضح :)

تقدر تستخدم
guiSetFont 

و تقدر تجيب خطوط من برا اللعبة (( فوتوشوب

guiCreateFont 

تجيب لاق onClientRender لأن كثرة إستخدام إيفنت DX والليبل أخخف بـ ككثير من الـ

بالنسبة لـ سؤالكـ ..

الوظيفة اللي بالرابط هذي توسط الإلمنت بالشاشة لأنه مقسوم على 2

أنت تبيه فوق الرادار لذلك حاول تحط القيمة 3 أو 4

Link to comment

الدي اكس كذا

dxDrawText("players in marker : ", 11, 490, 353, 596, tocolor(0, 0, 0, 255), 3.00, "default-bold", "center", "center", false, false, true, false, false) 

كيف سويته كذا

x,y = RelativeToAbsolute ( 0.5,0.5 ) 
        dxDrawText ( "iMr.Prestege",x,y ) 

+ عناد مافهمت :roll::roll:

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...