Forum

> > CS2D > Scripts > Special Kill.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Special Kill.

6 replies
To the start Previous 1 Next To the start

old Special Kill.

Blacko
User Off Offline

Quote
Hello !
I search a script.
•This script is for Custom Kill.
>I explain, when a player kill an other player with M4A1 [ID 32] it's not write in up right : "iDios M4A1 Player" but "iDios (Adm)M4A1 Player". I don't kow if you understant but I hope.
Thanks you so much !
iDios

old Re: Special Kill.

Banaan
User Off Offline

Quote
Customkill alone would not work to change the name of the killer. It might work to rapidly change the name of the player through cs2d cmd setname , e.g.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("hit", "AdminKill")

function AdminKill(victim, killer, weapon, hpdmg)
	-- Check if the killer is 'iDios' here, if so, proceed to the step below:
	if player(victim, "health") - hpdmg <= 0 then
		local oldname = player(killer, "name")
		local newname = oldname .. " (Adm)"

		parse("setname %i %s":format(killer, newname))
		parse("customkill %i %s %i":format(killer, weapon, victim))
		parse("setname %i %s":format(killer, oldname))
		return 1
	end
end

old Re: Special Kill.

Yasday
User Off Offline

Quote
I thought he wanted the weapon to have another name ( because there was no space between (Adm) and M4A1 ), just posted it because I thought it could help ( don't want to write the script ).

old Re: Special Kill.

ohaz
User Off Offline

Quote
1
2
3
4
5
6
7
addhook("kill", "adminkill")
function adminkill(killer,victim,weapon)
	if (weapon == 32) then
		parse("customkill "..killer.." (Adm)M4A1 "..victim)
		return 1
	end
end

old Re: Special Kill.

Banaan
User Off Offline

Quote
Actually, you just be right, Yasday. I personally didn't think of that option.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview