Novetus_src/defaultaddons/Addon_Template.lua

61 lines
1.8 KiB
Lua
Raw Permalink Normal View History

2022-07-08 01:12:47 +03:00
local this = {}
2022-07-12 03:35:21 +03:00
function this:Name()
return "Template"
end
-- checks if the script is enabled based on Script, Client, or some other reason
-- arguments: Script - returns the script type name (Server, Solo, Studio), Client - returns the Client name.
function this:IsEnabled(Script, Client)
return true
end
2022-07-07 19:18:03 +03:00
-- executes before the game starts (server, solo, studio)
2022-07-08 01:12:47 +03:00
-- arguments: Script - returns the script type name (Server, Solo, Studio), Client - returns the Client name.
function this:PreInit(Script, Client)
2022-07-07 19:18:03 +03:00
end
-- executes after the game starts (server, solo, studio)
-- arguments: none
2022-07-08 01:12:47 +03:00
function this:PostInit()
2022-07-07 19:18:03 +03:00
end
-- executes every 0.1 seconds. (server, solo, studio)
-- arguments: none
function this:Update()
end
2022-07-07 19:18:03 +03:00
-- executes after a character loads (server, solo, studio)
-- arguments: Player - Player getting a character loaded, Appearance - The object containing the appearance values
-- notes: in play solo, you may have to respawn once to see any print outputs.
2022-07-08 01:12:47 +03:00
function this:OnLoadCharacter(Player, Appearance)
2022-07-07 19:18:03 +03:00
end
-- executes after a player joins (server)
-- arguments: Player - the Player joining
2022-07-08 01:12:47 +03:00
function this:OnPlayerAdded(Player)
2022-07-07 19:18:03 +03:00
end
-- executes after a player leaves (server)
-- arguments: Player - the Player leaving
2022-07-08 01:12:47 +03:00
function this:OnPlayerRemoved(Player)
end
-- executes after a player gets kicked (server)
-- arguments: Player - the Player getting kicked, Reason - the reason the player got kicked
function this:OnPlayerKicked(Player, Reason)
2022-07-07 19:18:03 +03:00
end
-- executes before a player gets kicked (server)
-- arguments: Player - the Player getting kicked, Reason - the reason the player got kicked
2022-07-08 01:12:47 +03:00
function this:OnPrePlayerKicked(Player, Reason)
end
2022-07-12 03:35:21 +03:00
-- DO NOT REMOVE THIS. this is required to load this addon into the game.
2022-07-08 01:12:47 +03:00
function AddModule(t)
print("AddonLoader: Adding " .. this:Name())
2022-07-08 01:12:47 +03:00
table.insert(t, this)
2022-07-07 19:18:03 +03:00
end
2022-07-08 01:12:47 +03:00
_G.CSScript_AddModule=AddModule