-#Saimon Posted August 20, 2014 Share Posted August 20, 2014 السلام عليكم ورحمة الله وبركاته في طريقه اجيب عدد الاعبين بالعالم الوهمي 3 مثلاَ واذا في . وش استخدم ؟ Link to comment
iPrestege Posted August 20, 2014 Share Posted August 20, 2014 getElementsByType getElementDimension بـ كل بســاطة .. Link to comment
Jey Posted August 20, 2014 Share Posted August 20, 2014 getElementsByType getElementDimension بـ كل بســاطة .. واو ولكم باك برستيج Link to comment
-#Saimon Posted August 20, 2014 Author Share Posted August 20, 2014 ادري انه هريسه بس على الاقل حاولت 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
</Mr.Tn6eL> Posted August 20, 2014 Share Posted August 20, 2014 ادري انه هريسه بس على الاقل حاولت 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) --------------- ولكم برستج منور Link to comment
Bssol Posted August 20, 2014 Share Posted August 20, 2014 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
-#Saimon Posted August 20, 2014 Author Share Posted August 20, 2014 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now