Embedding CVar, console commands

Firkat54

Newbie
Joined
Mar 19, 2005
Messages
236
Reaction score
0
I've heard that you can embed a CVar or a console command in a map? If this can be done could someone tell me how? I would really like to know, so i don't have to write the readme everytime.
 
...Write the readme? What kind of console command is this?

In any case, point_servercommand will pass along the parameters to a "Command" input as server-run console commands.
 
i just want to put in

sv_cheats 1
sv_gravity 700
sv_friction 1
sv_cheats 0 (needs to come at the end)
 
When you turn off cheats, most cheat CVars will reset to default values. I'm not sure whether gravity and friction are cheats, though.
 
They aren't. Gravity is a server command, and I don't think servers appreciate maps that take control of the server commands.
 
Just wanted to pop in and say this is entirely possible. You can do anything from change gravity to modify bomb detonation timer, whatever. I personally don't know how, I've never needed to do any of that yet. Variables don't reset on cheats 0, too.
 
FictiousWill said:
Variables don't reset on cheats 0, too.

Some do. All physcannon CVars (speaking of HL2 here) and others that you see used in multiplayer games do. My argument would be stronger if I could remember which ones, but alas...
 
Raeven0 said:
Some do. All physcannon CVars (speaking of HL2 here) and others that you see used in multiplayer games do. My argument would be stronger if I could remember which ones, but alas...

barely any reset after turning cheats off..only ones considered to be cheats(with 2 or 3 exceptions)...like weapons, and such...but i dont know about in CS:S..but i know for a fact both of the commands i want do not reset...i may be new to mapping, but im not new to this...

Pesmerga said:
They aren't. Gravity is a server command, and I don't think servers appreciate maps that take control of the server commands.

and they arent cheats but they still requre sv_cheats to be enabled so that they can be enabled as well.
 
Raeven0 said:
...Write the readme? What kind of console command is this?

In any case, point_servercommand will pass along the parameters to a "Command" input as server-run console commands.


and by write the readme, i just meant telling the server admin to change the settings for the map to work (its a skateboard park btw)
 
if u want to change gravity just do it in the map dont use the cvar
 
that was what i just said...i dont want to have to write a readme for it because it would just be easyer if it was programmed into the map

please..either read the whole thread, or learn to read...
 
ok..i tried messing around with the point_servercommand, but i cant get it to work. so...please tell me what im doing wrong

1.)Alt+ Enter on it

2.)turn off SmartEdit

3.)add

4.)Key: gravity

5.)Value: sv_gravity 400

6.)Apply

7.)Save

8.)F9
 
It passes along parameters to a Command input as server-entered console commands.
 
and that means....

its the same as setting the 'alias' ingame?...where it just strings together a bunch of commands to one command?
 
That means...

If you send the entity a Command input, the parameters you specify for that input will be used as console commands.

Example: a logic_auto has the following output:
output OnMapSpawn target servercommand input Command parameter sv_gravity 800
In this case, the point_servercommand named servercommand would receive a Command input, with parameter sv_gravity 800, and would therefore pass along sv_gravity 800 as a server-entered console command.
 
i think...i understand...i found another forum that explained it too..so i doubt i'll be back for this topic...but maybe ill f**k up :D
 
hahaha..F**KIN RIGHT!..thats awesome.. thanks again...man..you should sell your help..with me..u'd be a millionaire
 
Back
Top