mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-05-15 16:22:28 +03:00
Updated VScript in Mapbase (markdown)
parent
335337043a
commit
5a865c7ff2
@ -35,6 +35,7 @@ For more information on VScript itself, [click here](https://developer.valvesoft
|
||||
* [CSceneListManager](VScript-in-Mapbase#CSceneListManager)
|
||||
* [CLogicExternalData](VScript-in-Mapbase#CLogicExternalData)
|
||||
* [Singletons *(Game Systems)*](VScript-in-Mapbase#Singletons)
|
||||
* [CLocalize](VScript-in-Mapbase#CLocalize)
|
||||
* [CAI_Network](VScript-in-Mapbase#CAI_Network)
|
||||
* [CGlobalState](VScript-in-Mapbase#CGlobalState)
|
||||
* [CMapbaseSystem](VScript-in-Mapbase#CMapbaseSystem)
|
||||
@ -48,6 +49,7 @@ For more information on VScript itself, [click here](https://developer.valvesoft
|
||||
* [AI_EnemyInfo_t](VScript-in-Mapbase#AI_EnemyInfo_t)
|
||||
* [CAI_Expresser](VScript-in-Mapbase#CAI_Expresser)
|
||||
* [CFourWheelVehiclePhysics](VScript-in-Mapbase#CFourWheelVehiclePhysics)
|
||||
* [CUserCmd](VScript-in-Mapbase#CUserCmd)
|
||||
* [Data Types](VScript-in-Mapbase#Data-Types)
|
||||
* [matrix3x4_t](VScript-in-Mapbase#matrix3x4_t)
|
||||
* [Global Functions](VScript-in-Mapbase#matrix3x4_t-Global-Functions)
|
||||
@ -185,6 +187,7 @@ Root class of all server-side entities. This class was already exposed to VScrip
|
||||
| *void* FireBullets(*FireBulletsInfo_t* info)| Fire bullets from entity with a given info handle |
|
||||
| *int* TakeHealth(*float* health, *int* damageType)| Give this entity health |
|
||||
| *bool* IsAlive()| Return true if this entity is alive |
|
||||
| *int* GetWaterLevel()| Get current level of water submergence |
|
||||
| *int* Classify()| Get Class_T class ID |
|
||||
| *bool* AddOutput(*string* output, *string* target, *string* input, *string* parameter, *float* delay, *int* maxTimes)| Add an output |
|
||||
| *string* GetKeyValue(string *key*)| Get a keyvalue |
|
||||
@ -338,7 +341,10 @@ The player entity. This class was already exposed to VScript, but it has new fea
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
| *handle* GetExpresser()| Get a handle for this player's expresser. |
|
||||
| *CAI_Expresser* GetExpresser()| Get a handle for this player's expresser. |
|
||||
| *string* GetPlayerName()| Gets the player's name. |
|
||||
| *string* GetPlayerUserId()| Gets the player's user ID. |
|
||||
| *string* GetNetworkIDString()| Gets the player's network (i.e. Steam) ID. |
|
||||
| *int* FragCount()| Gets the number of frags (kills) this player has in a multiplayer game. |
|
||||
| *int* DeathCount()| Gets the number of deaths this player has had in a multiplayer game. |
|
||||
| *bool* IsConnected()| Returns true if this player is connected. |
|
||||
@ -349,6 +355,16 @@ The player entity. This class was already exposed to VScript, but it has new fea
|
||||
| *bool* FlashlightIsOn()| Returns true if the flashlight is on. |
|
||||
| *void* FlashlightTurnOn()| Turns on the flashlight. |
|
||||
| *void* FlashlightTurnOff()| Turns off the flashlight. |
|
||||
| *void* DisableButtons(*int* buttons)| Disables the specified button mask. |
|
||||
| *void* EnableButtons(*int* buttons)| Enables the specified button mask if it was disabled before. |
|
||||
| *void* ForceButtons(*int* buttons)| Forces the specified button mask. |
|
||||
| *void* UnforceButtons(*int* buttons)| Unforces the specified button mask if it was forced before. |
|
||||
| *int* GetButtons()| Gets the player's active buttons. |
|
||||
| *int* GetButtonPressed()| Gets the player's currently pressed buttons. |
|
||||
| *int* GetButtonReleased()| Gets the player's just-released buttons. |
|
||||
| *int* GetButtonLast()| Gets the player's previously active buttons. |
|
||||
| *int* GetButtonDisabled()| Gets the player's currently unusable buttons. |
|
||||
| *int* GetButtonForced()| Gets the player's currently forced buttons. |
|
||||
|
||||
***
|
||||
|
||||
@ -529,6 +545,15 @@ Singletons are single, global instances which contain a bunch of usable function
|
||||
|
||||
***
|
||||
|
||||
### CLocalize
|
||||
Accesses functions related to localization strings. Can be accessed through a global `Localize` instance.
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
| *string* GetTokenAsUTF8(*string* token)| Gets the current language's token as a UTF-8 string (not Unicode). |
|
||||
|
||||
***
|
||||
|
||||
### CAI_Network
|
||||
The global list of AI nodes. Can be accessed through a global `AINetwork` instance.
|
||||
|
||||
@ -828,6 +853,37 @@ Handler for four-wheel vehicle physics. Can be accessed through `GetPhysics()` o
|
||||
|
||||
***
|
||||
|
||||
### CUserCmd
|
||||
Handle for accessing CUserCmd info. Typically used in the `RunPlayerCommand` hook.
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
| *int* GetCommandNumber()| For matching server and client commands for debugging. |
|
||||
| *int* GetTickCount()| The tick the client created this command. |
|
||||
| *Vector* GetViewAngles()| Player instantaneous view angles. |
|
||||
| *void* SetViewAngles(*Vector* angles)| Player instantaneous view angles. |
|
||||
| *float* GetForwardMove()| Forward velocity. |
|
||||
| *void* SetForwardMove(*float* value)| Sets forward velocity. |
|
||||
| *float* GetSideMove()| Side velocity. |
|
||||
| *void* SetSideMove(*float* value)| Sets side velocity. |
|
||||
| *float* GetUpMove()| Up velocity. |
|
||||
| *void* SetUpMove(*float* value)| Sets up velocity. |
|
||||
| *int* GetButtons()| Attack button states. |
|
||||
| *void* SetButtons(*int* value)| Sets attack button states. |
|
||||
| *int* GetImpulse()| Impulse command issued. |
|
||||
| *void* SetImpulse(*int* value)| Sets impulse command issued. |
|
||||
| *int* GetWeaponSelect()| Current weapon id. |
|
||||
| *void* SetWeaponSelect(*int* value)| Sets current weapon id. |
|
||||
| *int* GetWeaponSubtype()| Current weapon subtype id. |
|
||||
| *void* SetWeaponSubtype(*int* value)| Sets current weapon subtype id. |
|
||||
| *int* GetRandomSeed()| For shared random functions. |
|
||||
| *int* GetMouseX()| Mouse accum in x from create move. |
|
||||
| *void* SetMouseX(*int* move)| Sets mouse accum in x from create move. |
|
||||
| *int* GetMouseY()| Mouse accum in y from create move. |
|
||||
| *void* SetMouseY(*int* move)| Sets mouse accum in y from create move. |
|
||||
|
||||
***
|
||||
|
||||
## Data Types
|
||||
These are specific types of data.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user