SlashCo Wiki

SlashCo

SlashCo

The main library containing almost everything related to the gamemode.

Methods

SlashCo.AddDangerLevel( DangerLevel dangerLevel, number id = nil )
Registers or overrides a dangerlevel.
SlashCo.AddSlasherClass( SlasherClass slasherClass, number id = nil )
Registers or overrides a slasher class.
Color SlashCo.CopyColor( Color color )
Returns a copy of the given Color allowing you to safely modify it.
Disables the Global Fog
SlashCo.EnableGlobalFog()
Enables the Global Fog
table SlashCo.FindPlayersInRange( Vector origin, number radius, number specificTeam = nil, Entity|table ignoreEntity = nil )
Finds all players in a given radius and checks if their visible from the origin by doing a trace.
Returns the time the round started at using CurTime
SlashCo.SetRoundStartTime( number time = CurTime() )
Sets the time the round started using CurTime
Called when a game is hosted with sv_lan 1 to setup proper -multirun support for development and testing
Using sv_lan we can use -multirun and join the game with multiple gmod instances,
but now we have to ensure that they won't use the same steamid's.
Right now we change these function and we add the userid to allow for multiple multirun instances to work without colliding with each other.
  • PLAYER:SteamID()
  • PLAYER:SteamID64()
  • PLAYER:OwnerSteamID64()
  • PLAYER:UniqueID()