-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.lua
More file actions
98 lines (73 loc) · 3.41 KB
/
client.lua
File metadata and controls
98 lines (73 loc) · 3.41 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
--------------------------------------------------------------------------------------------------
local network = {}
network.getGroundPosition = assetify.network:create( "getGroundPositionFromServer", true ):on(
function ( self, px, py, pz, height )
enginePreloadWorldArea( px, py, 50 )
local ground = getGroundPosition( px, py, pz + height )
return px, py, ground
end,
{ isAsync = true, isPrioritized = true, subscriptionLimit = 5 }
)
--------------------------------------------------------------------------------------------------
--[[
client side
sound.play()
https://github.com/ov-sa/Assetify.library/wiki/API:-Sound#assetifysoundplay---client
example path folder
-----------------------------------------------------
pathfile: assetify_library\files\assets\sound\soundeffects\sound\bear-191995.mp3
pathfile: assetify_library\files\assets\sound\soundeffects\sound\beast-snarling-82801.mp3
pathfile: assetify_library\files\assets\sound\soundeffects\sound\warning-sound-6686.mp3
-----------------------------------------------------
example asset.vcl
-----------------------------------------------------
encryptKey: "XqtcfmbZ9oZU8Ton"
encryptMode: "aes128"
assetSounds:
animal:
"bear": "bear-191995.mp3"
"beast": "beast-snarling-82801.mp3"
warn:
"warning": "warning-sound-6686.mp3"
-----------------------------------------------------
]]--
local configClient = {}
configClient.playSound = {
assetName = "soundeffects",
soundVolume = 100,
isScoped = true,
isLooped = false
}
local cSound1 = assetify.sound.play( configClient.playSound.assetName, "animal", "bear", configClient.playSound.soundVolume, configClient.playSound.isScoped, configClient.playSound.isLooped )
local cSound2 = assetify.sound.play( configClient.playSound.assetName, "animal", "beast", configClient.playSound.soundVolume, configClient.playSound.isScoped, configClient.playSound.isLooped )
local cSound3 = assetify.sound.play( configClient.playSound.assetName, "warn", "warning", configClient.playSound.soundVolume, configClient.playSound.isScoped, configClient.playSound.isLooped )
-- return sound element
--[[
shared side
getAssetDep()
https://github.com/ov-sa/Assetify.library/wiki/API:-Sound#assetifysoundplay---client
example path folder
-----------------------------------------------------
pathfile: assetify_library\files\assets\module\WADADADANG\dep\WADADADANG.png
pathfile: assetify_library\files\assets\module\WADADADANG\dep\chicken-noise-196746.mp3
-----------------------------------------------------
example asset.vcl
-----------------------------------------------------
encryptKey: "XqtcfmbZ9oZU8Ton"
encryptMode: "aes128"
assetDeps:
texture:
"WADADADANG": "WADADADANG.png"
sound:
"chicken": "chicken-noise-196746.mp3"
-----------------------------------------------------
]]--
configClient.dep = {
assetName = "module",
assetType = "WADADADANG",
depSubIndex = false,
}
local cDep1 = assetify.getAssetDep( configClient.dep.assetName, configClient.dep.assetType, "texture", "WADADADANG", configClient.dep.depSubIndex )
-- return texture element
local cDep2 = assetify.getAssetDep( configClient.dep.assetName, configClient.dep.assetType, "sound", "chicken", configClient.dep.depSubIndex )
-- return userdata