Forum

> > CS2D > Scripts > [Solved]Register steam players in hc admin Lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch [Solved]Register steam players in hc admin Lua

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt [Solved]Register steam players in hc admin Lua

cs2d_is_a_Gem
User Off Offline

Zitieren
Hello dear unrealsofware team

Has anyone already developed a patch to save steam data in the hc command sequence?
(And administrate it from hc Lua )
Before hand thanks , bye
1× editiert, zuletzt 10.12.19 23:02:13

alt Re: [Solved]Register steam players in hc admin Lua

Mami Tomoe
User Off Offline

Zitieren
I have, it's quite easy.

It's like one line of code in every save sector that you need to edit.

Here's an example of the general idea, place this at the top priority Lua execution file (usually server.lua).

1
2
3
4
5
6
7
8
9
10
11
12
13
local _p = player

function player(p, s)
	if s == 'usgn' then
		local usgn, steam = _p(p, s), _p(p, 'steamid')
		
		return (((usgn and usgn > 0) and usgn) or steam)
	elseif s == 'usgnid' then
		return _p(p, 'usgn')
	else
		return _p(p, s)
	end
end

alt Re: [Solved]Register steam players in hc admin Lua

DC
Admin Off Offline

Zitieren
@user Mami Tomoe: You should mention that this hack will make
player(id, 'usgn')
return the Steam ID instead of the USGN ID for every player who is using Steam but no USGN.

This may lead to unexpected results when using any additional scripts which rely on the original behavior of
player(id, 'usgn')

alt Re: [Solved]Register steam players in hc admin Lua

cs2d_is_a_Gem
User Off Offline

Zitieren
Thank you very much for your kindness, I am very grateful to you, arriving at my house I will try the code since I am now in my work and I can not verify that it is correct, apparently this can work, when I have news I will paste the details of the console editing this post.

Edit 1: I found the first error, now I can register bots within the game, these bots are registered with the number 0.
This means that I can also register users without usgn or steam id.

Inside the file users.hcu we find the saved data
1
0,Mod2,[b]AgainstCheaters
after this I enter without usgn or steam id, and if I am registered as mod 2, but this is not capable of using f3 mod powers.
1× editiert, zuletzt 30.09.19 20:35:14
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht