- Documentation
- Server events
- onPlayerModInfo
Event
onPlayerModInfo
Arrives after onPlayerACInfo, only when the client found files that are not part of the game in its folder: .pak/.utoc/.ucas packages in Content/Paks other than pakchunk0 and pakchunk1, or .asi plugins. You can kick the player based on it.
Handler
addEventHandler("onPlayerModInfo", root, function(filename, itemList) ... end)Parameters
filenamestring- Always
"gameface". itemListtable- A list of
{ id, name, length }of the files found.
Source
source is the player.
Example
A no-mods server: kicks a player with extra packages.
addEventHandler("onPlayerModInfo", root, function(filename, items)
local names = {}
for _, item in ipairs(items) do names[#names + 1] = item.name end
kickPlayer(source, "Usuń mody: " .. table.concat(names, ", "))
end)