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 - Entity & Player Class
- 9K
- 0
Sharing is temporarily disabled
Left 4 Dead 2 Guide
Entity class
The Entity class wraps Valve's entity object and adds a couple of new features. Here's how you can utilize VSLib's entity class:
// You can find an entity by targetname
yourVariableNameHere <- Entity ( "targetname here" );
// You can find an entity by classname
yourVariableNameHere <- Entity ( "classname here" );
// You can find an entity by index; below, we are finding Player 1
yourVariableNameHere <- Entity ( 1 );
// You can find an entity by its filter
yourVariableNameHere <- Entity ( "!ellis" );
// You can set the entity by passing in a Valve CBaseEntity object
yourVariableNameHere <- Entity ( ent );
Once you have the Entity object, you can access any of the functions in the link below.
Available Entity Functions and Their Descriptions
Player class
The Player class builds on the Entity class and provides many more functions for Survivor and Special Infected entities. All the functions that are available on the Entity class also works on the Player class, so please see that function list too!
// You can find a player by index; below, we are finding Player 1.
// Players 1-4 are usually the survivors, and 4-64 can be valid infected.
yourVariableNameHere <- Player ( 1 );
// You can find a player by filter
yourVariableNameHere <- Player ( "!ellis" );
// You can set the player by passing in a Valve CTerrorPlayer object
yourVariableNameHere <- Player ( ent );
Once you have the Player object, you can access any of the functions below, as well as all of the Entity class functions.
Be the first to post a comment!