function onKill(cid, target)
if isPlayer(cid) == 1 and isPlayer(target) == 1 then
doBroadcastMessage(getCreatureName(target).." was killed by "..getCreatureName(cid).." at level " ..getPlayerLevel(target).., MESSAGE_STATUS_WARNING)
end
afterregisterCreatureEvent(cid, "PlayerDeath")
, it must be like:function onLogin(cid)
function onLogin(cid)
registerCreatureEvent(cid, "kill")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "FirstItems")
return TRUE
end
<event type="kill" name="kill" script="kill.lua" />
Damn, I dont know why, but it still doesnt working... And deathlist isnt working too :S
It requires a phpmyadmin version or something like that?
[26/11/2008 15:24:20] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/kill.lua
[26/11/2008 15:24:20] data/creaturescripts/scripts/kill.lua:3: unexpected symbol near ','
In the broadcast message at:Hmm.... gonna check it... btw
PHP:[26/11/2008 15:24:20] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/kill.lua [26/11/2008 15:24:20] data/creaturescripts/scripts/kill.lua:3: unexpected symbol near ','
getPlayerLevel(target)[B]..[/B]
function onKill(cid, target)
if isPlayer(cid) == 1 and isPlayer(target) == 1 then
doBroadcastMessage(""..getCreatureName(target).." was killed by "..getCreatureName(cid).." at level " ..getPlayerLevel(target).."", MESSAGE_STATUS_WARNING)
end
end
o.0, my mistake, wasdrunked..or wtf :<
here it is, kill.lua:
doBroadcastMessage(getCreatureName(cid).." was killed by "..getCreatureName(killer).." at level "..getPlayerLevel(cid), MESSAGE_STATUS_WARNING)
in playerdeath.lua, will be more better ;DdoBroadcastMessage(""..getCreatureName(target).." was killed by "..getCreatureName(cid).." at level " ..getPlayerLevel(target).."", MESSAGE_STATUS_WARNING)
true ;>
in playerdeath.lua, will be more better ;D
true ;>
in playerdeath.lua, will be more better ;D
doBroadcastMessage(""..getCreatureName(cid).." was killed by "..getCreatureName(killer).." at level " ..getPlayerLevel(cid).."", MESSAGE_STATUS_WARNING)
you is about ..? I think they must be there :>