Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Editcomm(eventid, player, msg)-- thank you foereaper for all the help getting this right
- local ChatPrefix = "set"
- local k = 0
- local ChatCache = {}
- for word in string.gmatch(msg, "[%w_]+") do
- k = k+1
- ChatCache[k] = word
- end
- if (ChatCache[1] == ChatPrefix) then
- for i = 1, #GWHELP do
- if(ChatCache[2]==tostring(GWHELP[i].command))then
- if(i<=16)and(i>=2)and(player:GetGuildRank()==0)then
- PreparedStatements(3, ChatCache[2], ChatCache[3], player:GetGuildName())
- player:SendBroadcastMessage("guild cmd "..ChatCache[2].." set to "..ChatCache[3]..".")
- return false;
- end
- if(i>=17)and(i<=35)and(i~=26)and(player:GetGMRank()==GWCOMM["SERVER"].GM_admin)then
- PreparedStatements(3, ChatCache[2], ChatCache[3], Server)
- player:SendBroadcastMessage("GM cmd "..ChatCache[2].." set to "..ChatCache[3]..".")
- return false;
- end
- end
- end
- player:SendBroadcastMessage("err...")
- return false;
- end
- end
- RegisterPlayerEvent(21, Editcomm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement