Jump to content

Department Radio ( Between teams )


Diverti

Recommended Posts

Hello all! :D

I made a script to communicate with legal teams, but it didnt work :/

For example: i write in PD team, the players can see in PD but in NNI or in NAV they can't...and if i write in NNI then players in other teams can't see it, only NNI but it's got PD tag and not NNI

So.. Please,

Please help :) Thank you very much ^_^

  
function kozosradio(thePlayer, commandName, ...) 
    local theFrakcio = getPlayerTeam(thePlayer) 
    
    if (theFrakcio) then 
        local frakcioID = tonumber(getElementData(theFrakcio, "id")) 
  
        if (frakcioID==1 or frakcioID==2 or frakcioID==3 or frakcioID == 4 or frakcioID == 5 or frakcioID == 6) then 
            if (...) then 
                local message = table.concat({...}) 
                local PDFrakcio = getPlayersInTeam(thePlayer("Rendorség")) 
                local OMSZFrakcio = getPlayersInTeam(getTeamFromName("Országos Mento Szolgálat")) 
                local NNIFrakcio = getPlayersInTeam(getTeamFromName("Nemzeti Nyomozó Iroda")) 
                local GOVFrakcio = getPlayersInTeam(getTeamFromName("Önkormányzat")) 
                local NAVFrakcio = getPlayersInTeam(getTeamFromName("Nemzeti Adó Vámhivatal")) 
                local playerName = getPlayerName(thePlayer) 
                
                for key, value in ipairs(PDFrakcio) do 
                outputChatBox("[#PD] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) 
                end 
                
                for key, value in ipairs(OMSZFrakcio) do 
                outputChatBox("[#OMSZ] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) 
                end 
                
                for key, value in ipairs(NNIFrakcio) do 
                outputChatBox("[#NNI] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) 
                end 
                
                for key, value in ipairs(GOVFrakcio) do 
                outputChatBox("[#GOV] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) 
                end 
                
                for key, value in ipairs(NAVFrakcio) do 
                outputChatBox("[#NAV] " .. playerName .. " mondja: " .. message, value, 0, 102, 255) 
                end 
            end 
        end 
    end 
end 
addCommandHandler("d", kozosradio, false, false) 
  

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