Jump to content

فنـكشنات جلب عدد الاعبين بالعالم الوهمي


Recommended Posts

ادري انه هريسه بس على الاقل حاولت :lol:

addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
        GUIEditor_Label = {} 
  
        GUIEditor_Label[1] = guiCreateLabel(51,468,173,41,"Players :",false) 
    end 
) 
  
addEventHandler("onClientRender", getRootElement(),function() 
local players = getElementsByType ( "player" )  
for getP,thePlayer in ipairs(players) do   
if ( getElementDimension ( getP ) == 0 ) then 
    guiSetText(GUIEditor_Label[1], "  ".. players .." " ) 
end 
end 
end) 

Link to comment
ادري انه هريسه بس على الاقل حاولت :lol:
addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
        GUIEditor_Label = {} 
  
        GUIEditor_Label[1] = guiCreateLabel(51,468,173,41,"Players :",false) 
    end 
) 
  
addEventHandler("onClientRender", getRootElement(),function() 
local players = getElementsByType ( "player" )  
for getP,thePlayer in ipairs(players) do   
if ( getElementDimension ( getP ) == 0 ) then 
    guiSetText(GUIEditor_Label[1], "  ".. players .." " ) 
end 
end 
end) 

addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
        GUIEditor_Label = {} 
  
        GUIEditor_Label[1] = guiCreateLabel(51,468,173,41,"Players :",false) 
    end 
) 
  
addEventHandler("onClientRender", getRootElement(),function() 
    local players = getElementsByType ( "player" )  
    for getP,thePlayer in ipairs(players) do   
        if ( getElementDimension ( thePlayer ) == 0 ) then 
            guiSetText(GUIEditor_Label[1], " Players :".. getP .." " ) 
        end 
    end 
end) 

---------------

ولكم برستج منور :occasion9:

Link to comment
GUIEditor_Label = {} 
GUIEditor_Label[1] = guiCreateLabel(51,468,173,41,"Players :",false) 
  
function updateLabel () 
    local n = 0 
    local players = getElementsByType ( "player" ) 
    for getP,thePlayer in ipairs(players) do   
        if ( getElementDimension ( thePlayer ) == 3 ) then 
            n = n + 1 
        end 
    end 
    guiSetText(GUIEditor_Label[1], "Players: "..tostring(n) ) 
end 
addEventHandler("onClientRender", getRootElement(), updateLabel ) 

Link to comment
GUIEditor_Label = {} 
GUIEditor_Label[1] = guiCreateLabel(51,468,173,41,"Players :",false) 
  
function updateLabel () 
    local n = 0 
    local players = getElementsByType ( "player" ) 
    for getP,thePlayer in ipairs(players) do   
        if ( getElementDimension ( thePlayer ) == 3 ) then 
            n = n + 1 
        end 
    end 
    guiSetText(GUIEditor_Label[1], "Players: "..tostring(n) ) 
end 
addEventHandler("onClientRender", getRootElement(), updateLabel ) 

مشكور بسول + كل من شارك بالموضوع , تمت الافاده

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