Forum

> > CS2D > Scripts > :notok:
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch :notok:

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt :notok:

Danilwra
User Off Offline

Zitieren
×
2× editiert, zuletzt 29.05.19 12:45:47

alt Re: :notok:

Devil-Thanh
GAME BANNED Off Offline

Zitieren
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

alt Re: :notok:

Rainoth
Moderator Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht