more api changes
This commit is contained in:
parent
65513b8af2
commit
442e293e4f
|
|
@ -0,0 +1,37 @@
|
|||
-- executes before the game starts (server, solo, studio)
|
||||
-- arguments: Script Type - returns the script type name (Server, Solo, Studio)
|
||||
function PreInit(Script)
|
||||
end
|
||||
|
||||
-- executes after the game starts (server, solo, studio)
|
||||
-- arguments: none
|
||||
function PostInit()
|
||||
end
|
||||
|
||||
-- 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.
|
||||
function OnLoadCharacter(Player, Appearance)
|
||||
end
|
||||
|
||||
-- executes after a player joins (server)
|
||||
-- arguments: Player - the Player joining
|
||||
function OnPlayerAdded(Player)
|
||||
end
|
||||
|
||||
-- executes after a player leaves (server)
|
||||
-- arguments: Player - the Player leaving
|
||||
function OnPlayerRemoved(Player)
|
||||
end
|
||||
|
||||
-- executes before a player gets kicked (server)
|
||||
-- arguments: Player - the Player getting kicked, Reason - the reason the player got kicked
|
||||
function OnPlayerKicked(Player, Reason)
|
||||
end
|
||||
|
||||
_G.CSScript_PreInit=PreInit
|
||||
_G.CSScript_PostInit=PostInit
|
||||
_G.CSScript_OnLoadCharacter=OnLoadCharacter
|
||||
_G.CSScript_OnPlayerAdded=OnPlayerAdded
|
||||
_G.CSScript_OnPlayerRemoved=OnPlayerRemoved
|
||||
_G.CSScript_OnPlayerKicked=OnPlayerKicked
|
||||
|
|
@ -141,4 +141,5 @@ XCOPY "%cd%\Novetus\LICENSE.txt" "%dest%\LICENSE" /y
|
|||
XCOPY "%cd%\Novetus\LICENSE-QUERY-PHP.txt" "%dest%\LICENSE-QUERY-PHP" /y
|
||||
XCOPY "%cd%\Novetus\LICENSE-RESHADE.txt" "%dest%\LICENSE-RESHADE" /y
|
||||
XCOPY "%cd%\Novetus\README-AND-CREDITS.TXT" "%dest%" /y
|
||||
XCOPY "%cd%\Novetus\Addon_Template.lua" "%dest%" /y
|
||||
if %debug%==1 pause
|
||||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:service("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -289,6 +291,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -313,6 +317,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:service("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -289,6 +291,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -313,6 +317,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:service("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -351,6 +353,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -375,6 +379,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:service("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -351,6 +353,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -375,6 +379,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -411,6 +413,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -435,6 +439,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -411,6 +413,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
coroutine.resume(coroutine.create(function()
|
||||
while Player ~= nil do
|
||||
wait(0.1)
|
||||
|
|
@ -435,6 +439,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -529,6 +531,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (game.Lighting:findFirstChild("DisableRespawns") == nil) then
|
||||
|
|
@ -551,6 +555,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -610,6 +612,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (game.Lighting:findFirstChild("DisableRespawns") == nil) then
|
||||
|
|
@ -632,6 +636,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -610,6 +612,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
end
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
|
||||
while true do
|
||||
wait(0.001)
|
||||
if (game.Lighting:findFirstChild("DisableRespawns") == nil) then
|
||||
|
|
@ -632,6 +636,8 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
|
||||
Server.IncommingConnection:connect(IncommingConnection)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -627,12 +629,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
end)
|
||||
PlayerService.PlayerRemoving:connect(function(Player)
|
||||
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
RunService:Run()
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -651,12 +653,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
end)
|
||||
PlayerService.PlayerRemoving:connect(function(Player)
|
||||
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
RunService:Run()
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ function KickPlayer(Player,reason)
|
|||
Server = game:GetService("NetworkServer")
|
||||
|
||||
if (Player ~= nil) then
|
||||
pcall(function() _G.CSScript_OnPlayerKicked(Player,reason) end)
|
||||
|
||||
for _,Child in pairs(Server:children()) do
|
||||
name = "ServerReplicator|"..Player.Name.."|"..Player.userId.."|"..Player.AnonymousIdentifier.Value
|
||||
if (Server:findFirstChild(name) ~= nil and Child.Name == name) then
|
||||
|
|
@ -657,12 +659,16 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Noti
|
|||
Player.Chatted:connect(function(msg)
|
||||
print(Player.Name.."; "..msg)
|
||||
end)
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerAdded(Player) end)
|
||||
end)
|
||||
PlayerService.PlayerRemoving:connect(function(Player)
|
||||
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
|
||||
if (showServerNotifications) then
|
||||
game.Players:Chat("Player '" .. Player.Name .. "' left")
|
||||
end
|
||||
|
||||
pcall(function() _G.CSScript_OnPlayerRemoved(Player) end)
|
||||
end)
|
||||
RunService:Run()
|
||||
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
|
||||
|
|
|
|||
Loading…
Reference in New Issue