• player:UserID() starts at 2?
    10 replies, posted
im just asking myself, ive been alot of messing around to get a script working of me and ive discovered that userID's start at 2 but why? im connecting as first and im the only one in the server, why arnt i UserID 1? any one got the anser?
For every time I setup a game, starting a new single player game or starting a new multiplayer game, my UserID increases by 1 [code] ] lua_run_cl print(LocalPlayer():UserID()) 16 Cannot change maxplayers while the server is running Dropped JSharpe from server (Disconnect by user.) Unknown command "sv_rollangle" Unknown command "sv_unlag_fixstuck" Lua initialized (Lua 5.1) Registering gamemode 'sandbox' derived from 'base' ScriptEnforce is disabled Executing listen server config file exec: couldn't exec listenserver.cfg InitFastCopy: only 49% fast props. Bug? Lua initialized (Lua 5.1) Registering gamemode 'sandbox' derived from 'base' Sending 289 'User Info' ConVars to server (cl_spewuserinfoconvars to see) Redownloading all lightmaps ] lua_run_cl print(LocalPlayer():UserID()) 17 Dropped JSharpe from server (Disconnect by user.) maxplayers set to 4 Unknown command "sv_rollangle" Unknown command "sv_unlag_fixstuck" Network: IP 192.168.0.4, mode MP, dedicated No, ports 27015 SV / 27005 CL Lua initialized (Lua 5.1) Registering gamemode 'sandbox' derived from 'base' ScriptEnforce is disabled Executing listen server config file exec: couldn't exec listenserver.cfg [L] sandbox Map: gm_construct Players: 1 / 4 Build: 3791 Server Number: 18 No pure server whitelist. sv_pure = 0 Adding master server 72.165.61.189:27011 Adding master server 69.28.140.247:27011 InitFastCopy: only 49% fast props. Bug? Connection to Steam servers successful. Lua initialized (Lua 5.1) Registering gamemode 'sandbox' derived from 'base' Sending 289 'User Info' ConVars to server (cl_spewuserinfoconvars to see) VAC secure mode is activated. Reinitialized 13 predictable entities Redownloading all lightmaps --- Missing Vgui material vgui/..\vgui\icon_con_high ] lua_run_cl print(LocalPlayer():UserID()) 18 [/code]
i got a dedi im testing on, but that starts at 2 always, after reboot, after just an server exit what ever
[QUOTE=bromvlieg;17108774]i got a dedi im testing on, but that starts at 2 always, after reboot, after just an server exit what ever[/QUOTE] The server itself is ID 1 if i remember correctly.
[QUOTE=kevkev;17117663]The server itself is ID 1 if i remember correctly.[/QUOTE] that fails... why dos the server need to have an userID? u cant use it since when u use if ply then wil reject if its server so u dont got ANYTHING to use the userID
Console = ID 1 and Entity 0 Remember: say This is a test = Console: This is a test
Gbps is right. Source is pretty object oriented, the dedi server console is most likely a hidden entity derived from the player entity.
[QUOTE=Nevec;17121742]Gbps is right. Source is pretty object oriented, the dedi server console is most likely a hidden entity derived from the player entity.[/QUOTE] It allows anyone who has access to the server console to interact with the other players as if they were a player.
[QUOTE=bromvlieg;17121669]that fails... why dos the server need to have an userID? u cant use it since when u use if ply then wil reject if its server so u dont got ANYTHING to use the userID[/QUOTE] What kind of code have you written that depends on UserID starting at 1...
[QUOTE=DarkSpider;17123184]What kind of code have you written that depends on UserID starting at 1...[/QUOTE] ...and what's stopping you from changing it to 2?
already did after i found out, but i still wanted to know why it was
Sorry, you need to Log In to post a reply to this thread.