• 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 "(name) pwned (name)"

Status
Not open for further replies.

Figaro

Banned User
Joined
Jun 25, 2008
Messages
275
Reaction score
0
Location
696E 2079 6F75 7220 6265 64
I need script like that! When i kill somebody it shows text "(my name) pwned (victim name)" with some nice effect. If somebody didnt understand, im not requesting frag reward.
 
Code:
function onKill(cid, target)
local name = getCreatureName(cid)
local kill = getCreatureName(target)
if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
broadcastMessage("".. name .." PWNS ".. kill ..".")
end
end

;>>>
 
in the .xml:

PHP:
<event type="death" name="BcDeath" script="bcdeath.lua"/>

In your login.lua below "function onLogin(cid)" add this line:
PHP:
registerCreatureEvent(cid, "BcDeath")

After that restart server and voila!
 
In creaturescripts.xml change this:
Code:
<event type="death" name="BcDeath" script="bcdeath.lua"/>
to
Code:
<event type="kill" name="BcDeath" script="bcdeath.lua"/>

Also, it kinda has to return TRUE, if nothing has been changed.
Use this one:
Code:
function onKill(cid, target)
	if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
		local name = getCreatureName(cid)
		local kill = getCreatureName(target)
		broadcastMessage(name .." PWNS ".. kill ..".")
	end
	return TRUE
end
 
Replace:
Code:
		local name = getCreatureName(cid)
		local kill = getCreatureName(target)
		broadcastMessage(name .." PWNS ".. kill ..".")
with:
Code:
	        broadcastMessage(getCreatureName(cid).." [Lv: "..getPlayerLevel(cid).."] PWNS "..getCreatureName(target).." [Lv: "..getPlayerLevel(target).."].")

Or if you dont want to show the names, replace: getCreatureName(cid).." with PK 1 and "..getCreatureName(target).." with PK 2, I didnt really get it, oki?
 
Status
Not open for further replies.
Back
Top