Jump to content

Problema


Julian09123

Recommended Posts

Hola quisiera saber como hacer para que a todos les salga el mensaje de Has joined blabla


 

    function joinHomeTeam()
    guiSetVisible(Window, false)
    showCursor(false) -- Window closed
    localPlayer = getLocalPlayer()
    local PlayerName = getPlayerName(getLocalPlayer())
    triggerServerEvent("joinHomeTeam", getRootElement(), localPlayer)

    outputChatBox (  PlayerName.. " #00ff00Has Joined to " .. homeName .. "" ,255, 255, 255, true )
end

function joinEnemyTeam()
    guiSetVisible(Window, false)
    showCursor(false) -- Window closed
    localPlayer = getLocalPlayer()
    local PlayerName = getPlayerName(getLocalPlayer())
    triggerServerEvent("joinEnemyTeam", getRootElement(), localPlayer)
    outputChatBox (  PlayerName.. " #00ff00Has Joined to " .. enemyName .. "" ,255, 255, 255, true )
end

function joinSpectatorsTeam()
    guiSetVisible(Window, false)
    showCursor(false) -- Window closed
    localPlayer = getLocalPlayer()
    local PlayerName = getPlayerName(getLocalPlayer())
    triggerServerEvent("joinSpectatorsTeam", getRootElement(), localPlayer)
    outputChatBox (  PlayerName.. " #00ff00Has Joined to Spectators" ,255, 255, 255, true )
end

 

Como hago para que les salga a todos? por que me sale a mi solo y a los otros a ellos nomas

Link to comment

Hice eso pero el Home y enemy me salen dos veces y el spectators una vez 

    function joinHomeTeam()
    guiSetVisible(Window, false)
    showCursor(false) -- Window closed
    localPlayer = getLocalPlayer()
    local PlayerName = getPlayerName(getLocalPlayer())
    triggerServerEvent("joinHomeTeam", getRootElement(), localPlayer)
    triggerServerEvent("outputall2", root, PlayerName.. " #00ff00Has Joined to " ..homeName)
end

function joinEnemyTeam()
    guiSetVisible(Window, false)
    showCursor(false) -- Window closed
    localPlayer = getLocalPlayer()
    local PlayerName = getPlayerName(getLocalPlayer())
    triggerServerEvent("joinEnemyTeam", getRootElement(), localPlayer)
    triggerServerEvent("outputall3", root, PlayerName.. " #00ff00Has Joined to " ..enemyName)
end

function joinSpectatorsTeam()
    guiSetVisible(Window, false)
    showCursor(false) -- Window closed
    localPlayer = getLocalPlayer()
    local PlayerName = getPlayerName(getLocalPlayer())
    triggerServerEvent("joinSpectatorsTeam", getRootElement(), localPlayer)
    triggerServerEvent("outputall", root, PlayerName.. " #00ff00Has Joined to Spectators")
end

 

addEvent("outputall", true)
addEventHandler("outputall", root, 
  function (msg)
    outputChatBox(msg, root, 255, 255, 255, true)
  end
)

addEvent("outputall2", true)
addEventHandler("outputall2", root, 
  function (msg2)
    outputChatBox(msg2, root, 255, 255, 255, true)
  end
)

addEvent("outputall3", true)
addEventHandler("outputall2", root, 
  function (msg3)
    outputChatBox(msg3, root, 255, 255, 255, true)
  end
)

 

Listo, me habia equivocado en una linea!

 

Graciasss Tomas!

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...