*DELETED*

All other Source.Python topics and issues.
Sam
Senior Member
Posts: 100
Joined: Tue Jul 03, 2018 3:00 pm
Location: *DELETED*
Contact:

[Q/DEV] UserInfo method

Postby Sam » Mon Jan 20, 2020 11:30 am

Maybe you should add this?

Code: Select all


pl 
= Player(1)
pl.get_convar_value("lol") # -> 2
# It is important for me to add this function to the Player
# It is important to add that this function is available when the player is fully loaded, otherwise the server will crash.


Code: Select all


from engines
.server import engine_server
get_convar_value 
= lambda index, var_name: engine_server.get_client_convar_value(index, var_name)

print(
get_convar_value(1, 'cl_language'))    # english
print(get_convar_value(1, 'name'))    # Ren
print(get_convar_value(1, 'lol'))    # 2 (Because: setinfo lol 2)
Last edited by Sam on Mon Jan 20, 2020 1:49 pm, edited 1 time in total.
User avatar
Ayuto
Project Leader
Posts: 2097
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [Q/DEV] UserInfo method

Postby Ayuto » Mon Feb 24, 2020 8:48 pm


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests