it's a vscripts mod. so, can't be used together with mods that alternate gameplay directly(such as Admin System) but works fine with Weapon Script mods since i didn't use weapon script files Works only on Local Host and Singleplay. Does...

VSLib Developer Guide - Utilities
- 9.3K
- 0
Sharing is temporarily disabled
Left 4 Dead 2 Guide
Utilities
Here are a couple of utilities that you can use. Click here for a complete list.
String Functions
- Utils.StringReplace( string, find, replace ) - Allows you to find and replace portions of a string. - Utils.CombineArray( array, delimiter = " " ) - Combines all the elements of an array into one string delimited by spaces. - Utils.BuildProgressBar(width, count, goal, fill = "|", empty = ".") - Builds a textual progress bar.
Print Functions
-printf( string, ... ) - C style printf function with up to 12 arguments; prints to console -Utils.SayToAll( string, ... ) - C style printf function that prints to the chatbox -Utils.SayToAllDel( string, ... ) - C style printf function that prints to the chatbox with a 100 ms delay. -Utils.SayToTeam(player, string, ...) - C style printf function that prints something to the specified src entity's (VSLib.Player) team -Utils.SayToTeamDel(player, string, ...) - C style printf function that prints something to the specified src entity's (VSLib.Player) team with 100 ms delay
Spawn Functions
-Utils.CreateEntity( classname, spawnPos = Vector(0,0,0), angles = Vector(0,0,0), otherKeyValues = { } ) - Creates a new entity with the specified keyvalues and returns the VSLib.Entity to you. -Utils.SpawnL4D1Survivor( survivor = BILL, spawnPos = Vector(0,0,0), angles = Vector(0,0,0) ) - Spawns a L4D1 survivor at the specified location with the specified angles: BILL, ZOEY, FRANCIS, and LOUIS -Utils.SpawnZombie(pos, zombieType = "default", attackOnSpawn = true) - Spawns a zombie at the specified location with info_zombie_spawn. -Utils.SpawnZombieNearPlayer( player, zombieNum, maxDist = 128, minDist = 32 ) - Spawns the requested zombie near a player and also checks to make sure that the spawn point is not visible to any survivor. Attempts to locate a position 20 times. If it can't find a suitable spawn location, it'll return false. Keep in mind that the closer the min and max distances are to each other, the lesser the chance that a suitable spawn will be found. For a good spawn chance, keep the min and max dist far apart. If by chance the survivors are looking everywhere at once, the infected prob won't spawn!
Math Functions
-Utils.CalculateDistance(vec1, vec2) - Calculates the distance between two vectors. -Utils.VectorDotProduct(a, b) - Calculates the dot product of two vectors. -Utils.VectorCrossProduct(a, b) - Calculates the cross product of two vectors. -Utils.VectorFromQAngle(angles, radius = 1.0) - Converts QAngles into vectors, with an optional vector length.
Misc Functions
-Utils.SearchMainTables ( idx ) - Searches for an index at the root, round vars, and user vars tables. -Utils.ForcePanicEvent( ) - Forces a panic event.
Be the first to post a comment!