Forum

> > CS2D > Scripts > Player factors.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Player factors.

6 replies
To the start Previous 1 Next To the start

old Player factors.

Rainoth
Moderator Off Offline

Quote
Is there a list of player factors here in forum (cause I didn't find any) ?
What I'm talking about :
Factors like

1
2
3
player(id,"usgn")
player(id,"name")
player(id,"health")
and others.. I need all of them and I don't know where to find them. Someone told me it's all lua commands but I don't know how to do it with e.g speed.

1
parse("speedmod "..id.." 'player(id,"speedmod")+15' ")
E.g. above : I want it to find player's speed and give it 15 points more. What I wrote is probably insanely wrong cause I have no idea how to do it... Thanks in advance

old Re: Player factors.

Deleted User

Quote
"lolololol" <- string
To insert something in a string use '..'
E.G.
1
2
3
4
Str = "Hello"
randomvariable = 5

Str = Str .. randomvariable

Str will now be equaled to "Hello5"

Similiar you do in the parse functions
1
parse('sethealth '.. id ..' '.. player(id, 'health') + 1)
edited 1×, last 10.03.13 11:57:38 am

old Re: Player factors.

Avo
User Off Offline

Quote
1
parse("speedmod "..id.." "..(player(id, "speedmod")+15))

EDIT: Damn you both.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview