-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathapply.lua
More file actions
31 lines (27 loc) · 747 Bytes
/
apply.lua
File metadata and controls
31 lines (27 loc) · 747 Bytes
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
PLUGIN.name = '/Apply chat command'
PLUGIN.author = 'Bilwin'
local netName = ('%s - Recognize'):format(PLUGIN.name)
function PLUGIN:InitializedChatClasses()
ix.command.Add('Apply', {
description = 'Introduce yourself',
OnRun = function(_, client)
local char = client:GetCharacter()
if not char then return end
local cid = char:GetInventory():HasItem('cid')
if cid then
ix.chat.Send(client, 'ic', cid:GetData('name', 'N/A') .. ', #' .. cid:GetData('id', 'N/A'))
else
ix.chat.Send(client, 'ic', char:GetName())
end
net.Start(netName, true)
net.Send(client)
end
})
end
if CLIENT then
net.Receive(netName, function()
net.Start('ixRecognize', true)
net.WriteUInt(2, 2)
net.SendToServer()
end)
end