Forum

> > CS2D > Scripts > kill +20 hp
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch kill +20 hp

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt kill +20 hp

StrangeGuy
BANNED Off Offline

Zitieren
hello guys, i am new here & noob scripting

so i need script if player killed another player he will get +20 hp
please i need help to do it

thanks for reading

alt Re: kill +20 hp

RIP-HereRestsPlookerbooy
BANNED Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
addhook("kill","_kill")
function _kill(killer,victim,weapon,x,y)

	if player(victim,"exists") and player(killer,"exists") then

		parse("sethealth " .. killer .. " " .. player(killer,"health")+20)

	end

end

user Yates: You mean like this? really?
1× editiert, zuletzt 16.01.17 11:10:15

alt Re: kill +20 hp

Yates
Reviewer Off Offline

Zitieren
@user RIP-HereRestsPlookerbooy: Please, use, spaces, behind, commas, like, you, are, supposed, to.

This,looks,like,crap,and,is,wrong.

Edit: No, I mean like this:

1
2
3
4
5
6
addhook("kill", "_kill")
function _kill(killer, victim, weapon, x, y)
     if player(victim, "exists") and player(killer, "exists") then
          parse("sethealth " .. killer .. " " .. player(killer, "health")+20)
     end
end
1× editiert, zuletzt 16.01.17 11:39:03

alt Re: kill +20 hp

Rainoth
Moderator Off Offline

Zitieren
1
2
3
4
addhook("kill","_kill")
function _kill(k)
	parse("sethealth "..k.." "..player(k,"health")+20)
end

You're welcome.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht