-
Notifications
You must be signed in to change notification settings - Fork 0
/
msteam.lua
48 lines (42 loc) · 1.29 KB
/
msteam.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--[[
Malte0621's ExternalSteam Module. [EARLY PROTOTYPE] - Many bugs exists and you should use pcall in some places to prevent errors.
(coroutine.wrap(function() end) is also helpful to prevent crashes during the request.)
--> Usage
#include "msteam.lua"
local started = steam.Start()
if started then
local userid = steam.GetId()
local username = steam.GetUsername()
-- steam.Shutdown() -- Calling this will close the game .-.
end
--> API
--------------------------
"msteam.lua"
--------------------------
steam = {
Start = function() -> <success:bool>
Shutdown = function() : Calling this will close the game .-.
GetUsername = function() -> <username:string>
GetId = function() -> <userid:int>
}
--------------------------
]]
local start_steam_api = start_steam_api
local shutdown_steam_api = shutdown_steam_api
local get_steam_username = get_steam_username
local get_steam_id = get_steam_id
start_steam_api, shutdown_steam_api, get_steam_username, get_steam_id = nil
steam = {
Start = function()
return start_steam_api()
end,
Shutdown = function() -- Calling this will close the game .-.
shutdown_steam_api()
end,
GetUsername = function()
return get_steam_username()
end,
GetId = function ()
return get_steam_id()
end
}