This repository was archived by the owner on Jan 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
VScript
Sw1ft edited this page Aug 10, 2021
·
3 revisions
Plugin creates script class CLeft4TAS in Squirrel's virtual machine. The global instance is Left4TAS
Using methods from the class you call native C++ functions in the plugin
| Method | Signature | Description |
|---|---|---|
| ServerCommand | void ServerCommand(string sCommand) | Immediately execute a server command (add symbol \n at the end of command!!) |
| ClientCommand | void ClientCommand(int nPlayerIndex, string sCommand) | Send a command to client |
| StartTimer | void StartTimer() | Start the timer |
| StopTimer | void StopTimer() | Stop the timer |
| ResetTimer | void ResetTimer() | Reset the timer |
| IsTimerStarted | bool IsTimerStarted() | Returns true if the timer is started |
| PrintTicks | void PrintTicks() | Print the current/total ticks |
| PrintTime | void PrintTime() | Print the current/total time |
| GetTime | float GetTime(bool precise) | Get the current/total time |
| SetSegmentTime | bool SetSegmentTime(float segmentTime, float segmentPreciseTime) | Set the time from previous segment |
| SayText | void SayText(int playerIndex, string message) | Print message to the client |
| SayTextAll | void SayTextAll(string message) | Print message to all clients |
| ClientPrint | void ClientPrint(int playerIndex, int destination, string message) | Print message to the client (destination: 1 - notify, 2 - console, 3 - chat, 4 - center of HUD) |
| ClientPrintAll | void ClientPrintAll(int destination, string message) | Print message to all clients |
| SetName | void SetName(int playerIndex, string name) | Set client's name |
| GoAwayFromKeyboard | void GoAwayFromKeyboard(int playerIndex) | Go to IDLE mode |
| TakeOverBot | bool TakeOverBot(int playerIndex) | Take over a bot |
| CreateFakeClient | int CreateFakeClient() | Create a fake client |
| CreateFakeClientNamed | int CreateFakeClientNamed(string name) | Create a fake client with a given name |
| CreateFakeClientTeam | int CreateFakeClientTeam(int team) | Create a fake client and change team to the chosen one (team: 1 - observer, 2 - survivors, 3 - infected) |
| CreateFakeClientNamedTeam | int CreateFakeClientNamedTeam(string name, int team) | Create a fake client with a given name and change team to the chosen one |
| GetCurrentMap | string GetCurrentMap() | Get map name |
| GetVersion | string GetVersion() | Get current version of Left4TAS |
printl( "Current version of Left4TAS is: " + Left4TAS.GetVersion() );