GithubHelp home page GithubHelp logo

Comments (6)

Iswenzz avatar Iswenzz commented on June 11, 2024 1

hi, you can use exec("record <client> <demoname>"); in GSC and make the demoname the player ID

from cod4x_server.

matt-alton avatar matt-alton commented on June 11, 2024

@Iswenzz thanks for the suggestion. How would I implement this so it works?

I tried the following in player.gsx as part of a welcome message block but it appears to have had no effect. No errors logged either.

    exec( "record " + self.name + " demo_" + self.clientid + "_" );

Regards,
Matt.

from cod4x_server.

matt-alton avatar matt-alton commented on June 11, 2024

@Iswenzz I've since managed to work out where the variable is set and have created a PR with the very simple change.

from cod4x_server.

Iswenzz avatar Iswenzz commented on June 11, 2024

You should use the client number instead of name, and the Pr doesn't seem to make sense, it's a steam ID function

from cod4x_server.

matt-alton avatar matt-alton commented on June 11, 2024

Hmm I see your point. This likely needs to check a dvar to check what type of ID is being used or a conditional statement to fallback to codguid if steamid is null. The code at present is hardcoded to only use the steamid in the autorecord filename.

https://github.com/callofduty4x/CoD4x_Server/blob/master/src/sv_client.c#L1212-L1220

	SV_SApiSteamIDToString(client->steamid, psti, sizeof(psti));

	//It was never intended to make a new demo for each fast_restart.
	//SV_SpawnServer() stops the demo and cleans the name which did not happen here which resulted in strange naming bug
	if(sv_autodemorecord->boolean && !client->demorecording && (client->netchan.remoteAddress.type == NA_IP || client->netchan.remoteAddress.type == NA_IP6))
	{
		SV_RecordClient(client, va("demo_%s_", psti));
	}

from cod4x_server.

Iswenzz avatar Iswenzz commented on June 11, 2024

Ye a fallback sounds good

from cod4x_server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.