Forum

> > CS2D > Scripts > Can I make a player Unhitable?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Can I make a player Unhitable?

8 replies
To the start Previous 1 Next To the start

old Can I make a player Unhitable?

Bowlinghead
User Off Offline

Quote
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?

old Re: Can I make a player Unhitable?

Vectarrio
User Off Offline

Quote
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

old Re: Can I make a player Unhitable?

Bowlinghead
User Off Offline

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

If you want to see my Script:
More >

old Re: Can I make a player Unhitable?

Bowlinghead
User Off Offline

Quote
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"?
edited 1×, last 05.08.11 07:50:07 pm

old Re: Can I make a player Unhitable?

Bowlinghead
User Off Offline

Quote
With this Code:
More >



It doesnt work :(+
EDIT:
YaY. If found it out! Thanks @ all!!
edited 1×, last 05.08.11 08:13:18 pm

old Re: Can I make a player Unhitable?

Seekay
Reviewer Off Offline

Quote
user Sens0r has written
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview