-
Notifications
You must be signed in to change notification settings - Fork 61
/
sh_plugin.lua
22 lines (16 loc) · 699 Bytes
/
sh_plugin.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
PLUGIN.name = "Assistance Terminals"
PLUGIN.description = "Adds assistance terminals that citizens can use to request Combine officers to their location."
PLUGIN.author = "VictorK"
ix.util.Include( "cl_plugin.lua" )
ix.util.Include( "sv_hooks.lua" )
function PLUGIN:InitializedChatClasses( )
local CLASS = { }
CLASS.format = "Incoming Assistance Terminal request: #%s | %s"
function CLASS:CanHear( speaker, listener )
return listener:IsCombine( )
end
function CLASS:OnChatAdd( speaker, text, bAnonymous, data )
chat.AddText( Color( 175, 125, 100 ), string.format( self.format, text, data[1] ) )
end
ix.chat.Register( "terminal_request", CLASS )
end