record command

Please post any questions about developing your plugin here. Please use the search function before posting!
nullable
Senior Member
Posts: 137
Joined: Sat Nov 08, 2014 7:22 pm

record command

Postby nullable » Sat Nov 22, 2014 9:20 pm

Hello,

Please tell me which command used for record demo? When I try next:

Syntax: Select all

engine_server.server_command('record demo_name;')


the result is:

Code: Select all

Unknown command "record"
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sat Nov 22, 2014 9:32 pm

Aren't demos recorded by the client and not the server? 'record' is a command, so I am a little confused why it tells you it isn't. It should instead tell you Can't record on dedicated server.
Image
nullable
Senior Member
Posts: 137
Joined: Sat Nov 08, 2014 7:22 pm

Postby nullable » Sun Nov 23, 2014 12:32 pm

Do you mean the correct way is below?

Syntax: Select all

engine_server.client_command(index, 'record demo_test;')
8guawong
Senior Member
Posts: 148
Joined: Sat Sep 20, 2014 3:06 am

Postby 8guawong » Sun Nov 23, 2014 1:27 pm

User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Nov 23, 2014 3:40 pm

As the thread 8guawong linked to mentions, it is the player's edict that is passed, not their index:

Syntax: Select all

engine_server.client_command(edict_from_index(index), 'record demo_test;')
Image
Hedgehog
Member
Posts: 62
Joined: Sun Nov 03, 2013 8:54 pm

Postby Hedgehog » Sun Nov 23, 2014 3:59 pm

I think you can't exec record command on client...

To record demo on the server side you need to enable SourceTV and use this command:
tv_record demo_test

Return to “Plugin Development Support”

Who is online

Users browsing this forum: Bing [Bot] and 45 guests