Search the Community
Showing results for tags 'script team gangues'.
-
"how do I perform the sum of the returned values of the teams, they return in number but when performing the sum to be displayed in the DX occurs error can anyone else?" local dende = "dende" local acari = "acari" local cidadealta = "cidadealta" function parte (_,state) if parte1 == false then showCursor(true) addEventHandler("onClientRender", root, part1) parte1 = true else showCursor(false) removeEventHandler("onClientRender", root, part1) parte1 = false end end bindKey("F7", "down", parte) local screenW2,screenH2 = guiGetScreenSize() local resW2, resH2 = 1366,768 local x, y = (screenW2/resW2/2), (screenH2/resH2/2) local parte1 = false local comandovermelho = countPlayersInTeam(dende) local comandovermelho2 = countPlayersInTeam(acari) local comandovermelho3 = countPlayersInTeam(cidadealta) local resultado = (tonumber(comandovermelho) + tonumber(comandovermelho2) + tonumber(comandovermelho3)) function part1 () if(countPlayersInTeam(comandovermelho) > 0)then dxDrawText("Valor:"..resultado, 656, 500, 719, 311, tocolor(0, 255, 0, 255), 1.40, "default-bold", "left", "top", false, false, false, true, false) else dxDrawText("Online:".. countPlayersInTeam(comandovermelho), 656, 320, 719, 311, tocolor(255, 0, 0, 255), 1.40, "default-bold", "left", "top", false, false, false, true, false) end end local x,y = guiGetScreenSize() function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end