DarkRP chat commands

Hey, tell me if this is wrong section, I wanted to know. Anyways if someone could help me make/edit chat commands for Darkrp, I was trying to make a /me that would be locally displayed around the player like
** Joe throws an apple
and a /event like,
A helicopter flys over the building
Obviously the event would be server wide, everyone can hear it, and there would be no name infront, admin only command, whereas /me any player can use and is a local event with name of the user displayed. Thanks for taking the time to read, hope someone can help me.

http://www.facepunch.com/showthread.php?t=750090
Examples for chat command setups, don’t know if this is helps you or not. You can always go through the DarkRP files to look at examples, start with Chat.lua mabey.

Yea, I looked through the chat.lua , didn’t really understand it,
[lua]ChatCommands = {}

function AddChatCommand(cmd, callback, prefixconst)
for k,v in pairs(ChatCommands) do
if cmd == v.cmd then return end
end
table.insert(ChatCommands, { cmd = cmd, callback = callback, prefixconst = prefixconst })
end

function RP_PlayerChat(ply, text)
DB.Log(ply:SteamName()…" ("…ply:SteamID()…"): “…text )
local callback = “”
for k, v in pairs(ChatCommands) do
if string.lower(v.cmd) == string.Explode(” “, string.lower(text))[1] then
callback = v.callback(ply, string.sub(text, string.len(v.cmd) + 2, string.len(text)))
if callback == “” then
return “”
end
text = string.sub(text, string.len(v.cmd) + 2, string.len(text))… " "
end
end
if callback ~= “” then callback = callback…” " end
return text, callback
end

function RP_ActualDoSay(ply, text, callback)
callback = callback or “”
if text == “” then return “” end
local col = team.GetColor(ply:Team())
local col2 = Color(255,255,255,255)
if not ply:Alive() then
col2 = Color(255,200,200,255)
col = col2
end

if GetGlobalInt("alltalk") == 1 then
	for k,v in pairs(player.GetAll()) do
		TalkToPerson(v, col, callback..ply:Name(), col2, text, ply)
	end
else
	TalkToRange(ply, callback..ply:Name(), text, 250)
end
return "" 

end
[/lua]
It would help alot if someone can explain this (or tell me if im on the right track?)

Get ULX for the /me.

rated gay. if U don’t post this on 10 other threads you will literally become gay IRL in 24 hours. shit got real.

By orders of rambo_6

I never read this post.