How would I take advantage of get_time_connected from NetChannelInfo?
Can't seem to figure it out being a total noob. Big thanks in advanced!
NetChannelInfo get_time_connected ?
You can use engine_server to retrieve a NetChannelInfo object.
Example:
Example:
Syntax: Select all
from engines.server import engine_server
from events import Event
from players.helpers import index_from_userid
@Event('player_say')
def on_player_say(event):
userid = event['userid']
index = index_from_userid(userid)
info = engine_server.get_player_net_info(index)
print(info.get_time_connected())
Ayuto wrote:You can use engine_server to retrieve a NetChannelInfo object.
Example:Syntax: Select all
from engines.server import engine_server
from events import Event
from players.helpers import index_from_userid
@Event('player_say')
def on_player_say(event):
userid = event['userid']
index = index_from_userid(userid)
info = engine_server.get_player_net_info(index)
print(info.get_time_connected())
Much thanks!
Return to “Plugin Development Support”
Who is online
Users browsing this forum: Bing [Bot] and 19 guests