Hi all. I have the following files in my /modules/sh/ folder.
Traitor.lua:
local CATEGORY_NAME = "Traitor"
function ulx.Traitor( ply, targs )
for _,v in pairs(targs) do
v:SetTeam( TEAM_TERROR )
v:Spawn()
v:SetRole(ROLE_TRAITOR)
end
SendFullStateUpdate()
ulx.fancyLogAdmin( ply, true, "#A has made #T a Traitor!", targs )
end
local Traitor = ulx.command( "Traitor", "ulx Traitor", ulx.Traitor, "!Traitor" )
Traitor:addParam{ type=ULib.cmds.PlayersArg }
Traitor:defaultAccess( ULib.ACCESS_SUPERADMIN )
Traitor:help( "Make target a Traitor." )
Innocent.lua:
local CATEGORY_NAME = "Innocent"
function ulx.Innocent( ply, targs )
for _,v in pairs(targs) do
v:SetTeam( TEAM_TERROR )
v:Spawn()
v:SetRole(ROLE_INNOCENT)
end
SendFullStateUpdate()
ulx.fancyLogAdmin( ply, true, "#A has made #T an Innocent!", targs )
end
local Innocent = ulx.command( "Innocent", "ulx Innocent", ulx.Innocent, "!Innocent" )
Innocent:addParam{ type=ULib.cmds.PlayersArg }
Innocent:defaultAccess( ULib.ACCESS_SUPERADMIN )
Innocent:help( "Make target a Innocent." )
Detective.lua:
local CATEGORY_NAME = "Detective"
function ulx.Detective( ply, targs )
for _,v in pairs(targs) do
v:SetTeam( TEAM_TERROR )
v:Spawn()
v:SetRole(ROLE_DETECTIVE)
end
SendFullStateUpdate()
ulx.fancyLogAdmin( ply, true, "#A has made #T a Detective!", targs )
end
local Detective = ulx.command( "Detective", "ulx Detective", ulx.Detective, "!Detective" )
Detective:addParam{ type=ULib.cmds.PlayersArg }
Detective:defaultAccess( ULib.ACCESS_SUPERADMIN )
Detective:help( "Make target a Detective." )
For some reason none of these files work while another is placed in the folder. Why is this, and how do I fix it?