Jump to content

مششكلةة بالككود


Recommended Posts

السسلام عليككم ورححمة الله وبرككاته ..

اخبارككم شباب ..

عسساكم بخخير ..

معي مششكلة بالكود هذا ..

  
-- Client Side 
local function getTeam ( team ) 
    return getTeamFromName ( team ) 
end 
  
addEventHandler ( "onClientRender", root, 
    function ( ) 
        local team1 = getTeam ( "NoTeam" ) 
        local team2 = getTeam ( "Police" ) 
        local team3 = getTeam ( "Grove" ) 
        local count1 = countPlayersInTeam ( team1 ) 
        local count2 = countPlayersInTeam ( team2 ) 
        local count3 = countPlayersInTeam ( team3 ) 
        if ( count1 ) then 
            guiSetText ( GUIEditor.label[3], "No Team Players : ".. tonumber ( count1 ) ) 
        else 
        if ( count2 ) then 
            guiSetText ( GUIEditor.label[4], "Police Players : ".. tonumber ( count2 ) ) 
        else 
        if ( count3 ) then 
            guiSetText ( GUIEditor.label[2], "Grove Players : ".. tonumber ( count3 ) ) 
        end 
      end 
   end 
 end 
) 
  

مششكلته ان بس يكشف عدد الاعبين حق No Team التيمات الثانية ما يكششفها ..

ارجو الحل وششكرا ..

Link to comment
local function getTeam ( team ) 
    return getTeamFromName ( team ) 
end 
  
addEventHandler("onClientRender",root,function() 
    local team1 = getTeam ( "NoTeam" ) 
    local team2 = getTeam ( "Police" ) 
    local team3 = getTeam ( "Grove" ) 
    local count1 = countPlayersInTeam ( team1 ) 
    local count2 = countPlayersInTeam ( team2 ) 
    local count3 = countPlayersInTeam ( team3 ) 
    if ( count1 ) then 
        guiSetText ( GUIEditor.label[3], "No Team Players : ".. tonumber ( count1 ) ) 
    end 
    if ( count2 ) then 
        guiSetText ( GUIEditor.label[4], "Police Players : ".. tonumber ( count2 ) ) 
    end 
    if ( count3 ) then 
        guiSetText ( GUIEditor.label[2], "Grove Players : ".. tonumber ( count3 ) ) 
    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...