Forum

> > CS2D > Scripts > How do i bind a key to set two players hp?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

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

10 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

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

Yates
Reviewer Off Offline

Zitieren
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 Kommentar

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

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

Yates
Reviewer Off Offline

Zitieren
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!

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

KimKat
GAME BANNED Off Offline

Zitieren
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.
1× editiert, zuletzt 23.01.11 18:43:03

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

KimKat
GAME BANNED Off Offline

Zitieren
Yates hat geschrieben
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.

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

DC
Admin Off Offline

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