• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[REQUEST] Broadcast when player dies

Vittyn

#Learning Linux
Joined
Nov 9, 2008
Messages
384
Reaction score
13
Location
Brasil
Try to edit this script to make it works, i'm trying but i can't ;/

PHP:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)


	local hitKillerName = "field item"
	local damageKillerName = ""

	if(lastHitKiller ~= FALSE) then
end
		if(isPlayer(lastHitKiller) == TRUE) then
end
			hitKillerName = getPlayerGUID(lastHitKiller)
		else
			hitKillerName = getCreatureName(lastHitKiller)
end
		if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
end
			if(isPlayer(mostDamageKiller) == TRUE) then
				damageKillerName = getPlayerGUID(mostDamageKiller)
			else
				damageKillerName = getCreatureName(mostDamageKiller)

end
player = getPlayerGUID
		if getPlayerLevel(player) >= 100 then
	doBroadcastMessage("O Player " .. player .. " foi morto por " .. hitKillerName .. " e " .. damageKillerName .. ", 17")
		else
	doBroadcastMessage("O Player " .. player .. " foi morto por " .. hitKillerName .. ", 17")
return TRUE
 
Last edited:
Something like this?
Lua:
function onKill(cid, target)
   if(isPlayer(target) == TRUE) then
      if getPlayerLevel(target) >= (getPlayerLevel(target)/2) then
           broadcastMessageEx(17," Player " .. getPlayerName(target) .. "[" ..getPlayerLevel(target) .. "] get killed by " .. getPlayerName(cid) .. " [" .. getPlayerLevel(target) .. "]")
      end
      return TRUE

   end
end
 
Back
Top