erikalabama
New Member
- Joined
- Jan 5, 2008
- Messages
- 27
- Reaction score
- 0
PHP:
function onPrepareDeath(cid, killer)
onKill(killer, cid)
return TRUE
end
local voc = getPlayerVocation(target)
local exp = 1000 --EDIT, Amount of exp given...
function onKill(cid, target)
if isPlayer(cid) == TRUE then
if voc == 3 or voc == 7 then
doPlayerAddExp(cid, 1000)
doPlayerSendTextMessage(cid, 22, "You killed "..getCreatureName(target).." and received 1,000 experience!.")
end
end
return TRUE
end
PHP:
<event type="preparedeath" name="Killed" script="kill.lua"/>
menz it dosen't work, when I kill a pally I get banned :S, using tfs 0.2 (mystic sprit)