Forum

> > CS2D > Scripts > Killer's Weapon
Forums overviewCS2D overview Scripts overviewLog in to reply

English Killer's Weapon

8 replies
To the start Previous 1 Next To the start

old Killer's Weapon

Marcell
Super User Off Offline

Quote
Welcome!

I would like to ask how can i get killer's weapon?
Mean when somebody kill someone with "this weapon"

tried with player(killer, "weapon") but won't work

old Re: Killer's Weapon

Alistaire
User Off Offline

Quote
1
2
3
4
5
addhook('kill', '_killHook')

function _killHook(killer, victim, weapon)
	print(weapon)
end

old Re: Killer's Weapon

Marcell
Super User Off Offline

Quote
Everything is works, but weapon's name don't want

1
2
3
4
5
6
7
8
9
addhook("kill", "adv_log", -9000)
function adv_log(id, killer, victim, weapon, x, y)
	local state, file = pcall(io.open, advancedlog .. os.date("%Y_%m_%d", os.time()) .. "-adv.log", "a+")
	if file then
	local file = io.open(""..advancedlog.."/adv.log", "a+")
	file:write("[" .. os.date("%H:%M:%S", os.time()) .. "]: #"..player(id, "usgn")..", "..player(id, "ip")..", "..player(killer, "name").." KILLED "..player(victim, "name").." WITH "..player(killer, "weapon").." AT "..player(victim,"x").." & "..player(victim,"y").." \n")
	file:close()
	end
end

old Re: Killer's Weapon

Alistaire
User Off Offline

Quote
Also why would you want to io.open and io.close every time someone dies. This script will certainly shit on your server's speed.

old Re: Killer's Weapon

Marcell
Super User Off Offline

Quote
exactly what i did now...
a log system...

which save player ip, name, usgn when he/she join with time and date

which save killer name, position, weapon, victim name with time and date

which save building name and position with time and date and who made it

and also a chatlog which saves every messages with time and date..

anway no.. not really, because it will be a roleplay server, where you can't kill without reason..

old Re: Killer's Weapon

Yates
Reviewer Off Offline

Quote
user Marcell has written
anway no.. not really, because it will be a roleplay server, where you can't kill without reason..

So if I am a psychopath and I kill people because I am mentally ill this would suffice, right?

Saddle up, men. Because either way I will bust your balls.

old Re: Killer's Weapon

Marcell
Super User Off Offline

Quote
i so scared :$

btw, if someone kills without reason, that will be jailed
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview