Boza
New Member
- Joined
- Feb 16, 2010
- Messages
- 184
- Reaction score
- 0
Sloved!
Kill Player command for TFS 0.3.6
Credits go to Cykotitan.
Don't Forget to add this in data/talkactions/scripts
Kill Player command for TFS 0.3.6
Credits go to Cykotitan.
Lua:
function onSay(cid, words, param, channel)
if param == '' then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
end
local pid = getPlayerByNameWildcard(param)
if not isPlayer(pid) or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid)) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
end
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You killed " .. param .. "!")
doPlayerSendTextMessage(pid, MESSAGE_EVENT_ORANGE, "You were killed by an admin!")
return doCreatureAddHealth(pid, - getCreatureMaxHealth(pid))
end
Don't Forget to add this in data/talkactions/scripts
Code:
<talkaction log="yes" access="5" words="/kill" event="script" value="killplayer.lua"/>
Last edited: