Model
Object → Model
Constructor
Model(): ModelStatic functions
getGlobalActivityID | Returns the ID of the activity by name. |
getGlobalActivityName | Returns the name of the activity by ID. |
#Model.getGlobalActivityID
function Model.getGlobalActivityID(act_name: string): integer
Returns the ID of the activity by name.
Basic activities: https://developer.valvesoftware.com/wiki/Activity_List#Base_activities
Gmod ones: https://wiki.facepunch.com/gmod/Enums/ACT
Parameters
| Name | Type | Description |
|---|---|---|
act_name | string | The name of the activity. |
Returns
| Type | Name | Description |
|---|---|---|
integer | act_id | The ID of the activity. |
#Model.getGlobalActivityName
function Model.getGlobalActivityName(act_id: integer): string
Returns the name of the activity by ID.
Basic activities: https://developer.valvesoftware.com/wiki/Activity_List#Base_activities
Gmod ones: https://wiki.facepunch.com/gmod/Enums/ACT
Parameters
| Name | Type | Description |
|---|---|---|
act_id | integer | The ID of the activity. |
Returns
| Type | Name | Description |
|---|---|---|
string | act_name | The name of the activity. |