Forum

> > CS2D > Scripts > Can I make a player Unhitable?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Can I make a player Unhitable?

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Can I make a player Unhitable?

Bowlinghead
User Off Offline

Zitieren
Hello,
I've got a question:
I want to make a player unhitable.
So that I mean if I make a player unhitable he can get hurt, but he can't hit others.
So the "return 1" command doesnt work, its make the player undamageable.

Is it possible?

alt Re: Can I make a player Unhitable?

Vectarrio
User Off Offline

Zitieren
well, yeah
1
2
3
if source=unhitable_player then
	return 1
end

source is the player that hits you, if you didn't know
of course that's in "hit" hook function

alt Re: Can I make a player Unhitable?

Bowlinghead
User Off Offline

Zitieren
Thanks for your answer but it doesn't work!

If you want to see my Script:
Mehr >

alt Re: Can I make a player Unhitable?

Bowlinghead
User Off Offline

Zitieren
Oh yeah!

Upps
I changed it into
1
if source==run[source] then

But now everyone can damage the Source id and the killer id.

Maybe its work if I give the "source" the HP from the hit from the "Killer"?
1× editiert, zuletzt 05.08.11 19:50:07

alt Re: Can I make a player Unhitable?

Bowlinghead
User Off Offline

Zitieren
With this Code:
Mehr >



It doesnt work :(+
EDIT:
YaY. If found it out! Thanks @ all!!
1× editiert, zuletzt 05.08.11 20:13:18

alt Re: Can I make a player Unhitable?

Seekay
Reviewer Off Offline

Zitieren
user Sens0r hat geschrieben
You can d it with rcon bind rcon setmaxhealth [id] 250 F


fail.. you just get 250 HP, oh and, thats not Lua, its just a console command. oh wait i get it, you mean that he have to keep pressing the button? well thats kinda annoying, right? nevermind
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht