Jump to content

Command problem


WASSIm.

Recommended Posts

hi guys i have problem i hope someone help me, so i make new event on player chat and he problem if anyone put command on chat its don't work

addEvent("onPlayerChatRoom", true) 
addEventHandler("onPlayerChatRoom", root, 
function (message, type) 
    if (string.sub(message, 1, 1) == "/") then 
        local argcmd = split(message, " ") 
        local command = tostring(argcmd[1]:gsub("/", "", 1)) 
        table.remove(argcmd, 1) 
        executeCommandHandler(command, source, unpack(argcmd))) 
    end 
end) 

Link to comment
  • 3 weeks later...

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