Jump to content

Global Cheat


Resulcan

Recommended Posts

  • Moderators

I hope you think chat and not cheat :D
Something like that. (its not the full code, you need to finish it!)

-- SERVER

function sendMessageToCustomChat(player, cmd, ...)
    -- TODO: check if `player` can use this command
    local text = table.concat({...}, " ")
	
    for i, target in ipairs(getElementsByType("player")) do
        -- TODO: check if `target` can see this message
        outputChatBox(text, target)
    end
end
addCommandHandler("chatcommand", sendMessageToCustomChat)

 

Edited by Patrick
  • Like 1
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...