Forum

> > CS2D > Scripts > :notok:
Forums overviewCS2D overview Scripts overviewLog in to reply

English :notok:

3 replies
To the start Previous 1 Next To the start

old :notok:

Danilwra
User Off Offline

Quote
×
edited 2×, last 29.05.19 12:45:47 pm

old Re: :notok:

Devil-Thanh
GAME BANNED Off Offline

Quote
try this.
1
2
3
4
5
6
addhook("objectkill","kl")
function kl(id)
	if id>0 then
		parse("setscore "..id.." "..(player(id,"score")+2))
	end
end

old Re: :notok:

Rainoth
Moderator Off Offline

Quote
cs2d lua hook objectkill

It has two arguments - object id (which you wrote) and player id (which you didn't write)

so the correct way would be

1
2
3
4
addhook("objectkill","_ob_ki")
function _ob_ki(id,p)
	parse("setscore "..p.." "..player(p,"score")+2)
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview