function onSay(cid, words, param, channel)
if(param == "") then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
end
local c = db.executeQuery
if not c then
c = db.query
end
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
end
doRemoveCreature(pid)
local query = c("delete from players where name = " .. db.escapeString(getCreatureName(pid)) .. ";")
if not query then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. getCreatureName(pid) .. " cannot be deleted.")
end
return doBroadcastMessage(getCreatureName(pid) .." has been deleted for breaking the rules!")
end