Sometimes you might feel for punishing a player by killing him
How to use:
/kill playername
How to use:
/kill playername
Lua:
function onSay(cid, words, param)
local player = getCreatureByName(param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return TRUE
end
local pid = getPlayerByNameWildcard(param)
if(pid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
return TRUE
end
if isPlayer(player) == TRUE then
doPlayerSendTextMessage(cid, 22, "You killed "..param.."!")
doPlayerSendTextMessage(player, 19, "You got killed by an admin")
doCreatureAddHealth(player, -getCreatureMaxHealth(player))
end
return TRUE
end
PHP:
<talkaction log="yes" access="5" words="/kill" event="script" value="killplayer.lua"/>
Last edited: