Jump to content

Show Last 2 Players on Draw


freudo

Recommended Posts

Hi guys,

I have a problem

how to ı send last 2 players to client?

Picture:

3MX3EOf.png

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

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