-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.lua
52 lines (42 loc) · 1.7 KB
/
examples.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
49
50
51
52
-- incredible-gmod.ru
-- IncredibleAPI lib — Usage examples:
IncredibleAPI:Call("WebMaterials", "http://incredible-gmod.ru/assets/other/beelze_pixel.png", function(webMat) -- Get web material
print(webMat)
if CLIENT then
hook.Add("HUDPaint", "DrawWebMatExample", function()
surface.SetDrawColor(255, 255, 255, 255)
surface.SetMaterial(webMat)
surface.DrawTexturedRect(ScrW()*0.5 - 128, ScrH()*0.5 - 120.5, 256, 241)
end)
end
end)
local ply = player.GetHumans()[1]
IncredibleAPI:Call("GeoIP", ply, function(country_code) -- Get country code (подобные функции принимают ply или SteamID64)
print(country_code)
end)
IncredibleAPI:Call("Proxy", ply, function(is_use_proxy) -- Anti-proxy API
ply:Kick("Proxy is not allowed!")
end)
local steam_api_key = "!!! Your SteamAPI-Key Here !!!"
IncredibleAPI:Call("SteamPlaytime", ply, steam_api_key, function(seconds) -- Get gmod playtime
print(seconds/60)
end)
IncredibleAPI:Call("SteamAvatar", ply, steam_api_key, function(avatar_url) -- Get player avatar url
print(avatar_url)
end)
IncredibleAPI:Call("SteamBans", ply, steam_api_key, function(bans_data) -- Get player bans
PrintTable(bans_data)
end)
IncredibleAPI:Call("SteamFamilyShared", ply, steam_api_key, function(is_family_shared) -- Anti-FamilyShared
if is_family_shared then
ply:Kick("Family-Shared is not allowed!")
end
end)
IncredibleAPI:Call("SteamIsInGroup", ply, steam_api_key, "4822177", function(bool) -- Check if user member of group
print(bool)
end)
IncredibleAPI:Call("SteamGetCollectionItems", steam_api_key, "1829820706", function(ids) -- Auto resource.AddWorkshop 4all collection items
for k, workshopid in pairs(ids) do
resource.AddWorkshop(workshopid)
end
end)