function onKill(cid, target)
if isPlayer(target) then
if getPlayerIp(target) == getPlayerIp(cid) then
doPlayerAddLevel(cid, -10)
doPlayerSendTextMessage(cid, 22, "You have been de-leveled for trying to cheat.")
end
end
end
<event type="kill" name="name1" event="script" value="name2.lua"/>
function onKill(cid, target)
if isPlayer(target) then
if getPlayerIp(target) == getPlayerIp(cid) then
doPlayerAddLevel(cid, -10)
doPlayerSendTextMessage(cid, 22, "You have been de-leveled for trying to cheat.")
end
end
return true
end
<event type="kill" name="anticheat" event="script" value="anticheat.lua"/>
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "anticheat")
local sirion = 10 -- How many levels you want the player to lose.
local sirionmsg = "You have lost 10 levels for cheating." -- the message when cheat lvls
function onKill(cid, target)
if isPlayer(target) and getPlayerIp(target) == getPlayerIp(cid) then
doPlayerAddLevel(cid, -sirion)
doCreatureSay(uid, sirionmsg, TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 65)
end
return true
end