Forum

> > CS2D > Scripts > How do i bind a key to set two players hp?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How do i bind a key to set two players hp?

10 replies
To the start Previous 1 Next To the start

moved How do i bind a key to set two players hp?

Yates
Reviewer Off Offline

Quote
Hey, i know how to use rcon to bind key to set hp
1
bind "1" "rcon setmaxhealth [id] [ammount]"
But how do i bind two players o.O !?
I tryed these 2
Spoiler >

But nothing works
Now im doubting that it is possible?
Please help, and if it isnt then ill just bind 2 keys

Admin/mod comment

please note: binding and stuff goes to the scripting section as well! moved /DC

old Re: How do i bind a key to set two players hp?

Yates
Reviewer Off Offline

Quote
Nope, it only heals the first ID
Edit: Got it,
1
bind "1" "rcon setmaxhealth [id] [ammount]; setmaxhealth [id] [ammount]
You dont need rcon on second one, thx for the help!

old Re: How do i bind a key to set two players hp?

KimKat
GAME BANNED Off Offline

Quote
Simply do...
Spoiler >
This will set the health of ID's 2 and 3 to 1(hp) if they exist... I don't know if there is another way... you could do it easier with a Lua script though.
edited 1×, last 23.01.11 06:43:03 pm

old Re: How do i bind a key to set two players hp?

KimKat
GAME BANNED Off Offline

Quote
Yates has written
Lol, then I oversaw it, my bad
Edit: kimkat, you don't need rcon on the second sethealth..
Well, ok. I just thought that you needed to issue the rcon command together with each command, so yea my bad.

old Re: How do i bind a key to set two players hp?

DC
Admin Off Offline

Quote
this might (but shouldn't) happen if the line is very long.

as you already noted: rcon counts for the WHOLE line. everything after it will be executed on the server.
this means: ONE rcon is ALWAYS enough. you never need two or more.

see cs2d cmd rcon (take a look at WARNING and the sample)
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview