freudo Posted March 21, 2015 Share Posted March 21, 2015 Hi guys, I have a problem how to ı send last 2 players to client? Picture: codes: server if #activePlayers == 1 then self.rankingBoard:add(activePlayers[1], timePassed) --clientCall(getRootElement(),"onWins", activePlayers[1]) triggerClientEvent("onWins", getRootElement(), activePlayers[1]) triggerEvent("onPlayerDestructionDerbyWin", getRootElement(), activePlayers[1]) end if #activePlayers == 2 then triggerClientEvent("onWins2", getRootElement(), activePlayers[2]) end activePlayer[1]= client: addEvent("onWins", true) function drawNexMapString(player) local r,g,b = 255,255,255 local team = getPlayerTeam(player) if team then r,g,b = getTeamColor(team) end ganador=player ancho=300 alto=y/12 fontAlto = dxGetFontHeight(2,"default-bold") alpha=200 start2 = getTickCount() addEventHandler("onClientRender",getRootElement(),renderWin) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),renderWin) end, 8000, 1 ) --winner = dxText:create(""..getPlayerNametagText(player).." #ffffffEs El #99ff00Ganador", x / 2, y / 2 - 10 + 75 - 41, false, "default-bold", 1, "center") --nextmap = dxText:create( "#333333C#FFFFFFerrando #333333M#FFFFFFensage #333333e#FFFFFFn:", x / 2, y / 2 - 10 + 75 + 11, false, "default-bold", 1, "center") end addEventHandler("onWins", getRootElement(), drawNexMapString) activePlayer[2]= addEvent("onWins2", true) function drawNexMapStrings(player) local r,g,b = 255,255,255 local team = getPlayerTeam(player) if team then r,g,b = getTeamColor(team) end ganador2=player ancho=300 alto=y/12 fontAlto = dxGetFontHeight(2,"default-bold") alpha=200 start2 = getTickCount() addEventHandler("onClientRender",getRootElement(),renderWin2) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),renderWin2) end, 5000, 1 ) --winner = dxText:create(""..getPlayerNametagText(player).." #ffffffEs El #99ff00Ganador", x / 2, y / 2 - 10 + 75 - 41, false, "default-bold", 1, "center") --nextmap = dxText:create( "#333333C#FFFFFFerrando #333333M#FFFFFFensage #333333e#FFFFFFn:", x / 2, y / 2 - 10 + 75 + 11, false, "default-bold", 1, "center") end addEventHandler("onWins2", getRootElement(), drawNexMapStrings) Link to comment
Addlibs Posted March 22, 2015 Share Posted March 22, 2015 Explain what you're looking for in a bit more detail. We can't help you if we don't understand your aim. 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