SetConfig: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{v1_8_beta}} {{Welcome|desc=Changes automatic behaviour of npc on events like player stream in or skin is changed by server| params=<source lang="lua">(value)</source> <poem> :: value - An integer from following table which can be combined using bitwise OR {| class="wikitable" |+ SetConfig Function Features ! Configuration Value !! Feature !! Description |- | 1 || Sends an onfoot-packet to server || Whenever a player streams in. When an NPC is inside a vehicle, nothing...")
 
No edit summary
Line 4: Line 4:
<poem>
<poem>
:: value - An integer from following table which can be combined using bitwise OR
:: value - An integer from following table which can be combined using bitwise OR
{| class="wikitable"
</poem>
|+ SetConfig Function Features
{{{!}} class="wikitable"
{{!}}+ SetConfig Function Features
! Configuration Value !! Feature !! Description
! Configuration Value !! Feature !! Description
|-
{{!}}-
| 1 || Sends an onfoot-packet to server || Whenever a player streams in. When an NPC is inside a vehicle, nothing happens.
{{!}} 1 {{!}}{{!}} Sends an onfoot-packet to server {{!}}{{!}} Whenever a player streams in. When an NPC is inside a vehicle, nothing happens.
|-
{{!}}-
| 2 || Sends an onfoot-packet to preserve weapon || When the server sets a skin for the NPC on various occasions, the NPC sends an onfoot-packet so that its weapon is not lost (as seen by other players).
{{!}} 2 {{!}}{{!}} Sends an onfoot-packet to preserve weapon {{!}}{{!}} When the server sets a skin for the NPC on various occasions, the NPC sends an onfoot-packet so that its weapon is not lost (as seen by other players).
|-
{{!}}-
| 3 (Default) || 1 | 2 || Combined features: Sends an onfoot-packet to the server when a player streams in, and preserves the weapon when the server sets a skin for the NPC.
{{!}} 3 (Default) {{!}}{{!}} 1 {{!}} 2 {{!}}{{!}} Combined features: Sends an onfoot-packet to the server when a player streams in, and preserves the weapon when the server sets a skin for the NPC.
|}|
{{!}}}|
}}
}}

Revision as of 15:46, 5 February 2024

This function was added in v1.8 beta and will not work on previous versions.


Description:
Changes automatic behaviour of npc on events like player stream in or skin is changed by server


Parameters:

(value)

value - An integer from following table which can be combined using bitwise OR

SetConfig Function Features
Configuration Value Feature Description
1 Sends an onfoot-packet to server Whenever a player streams in. When an NPC is inside a vehicle, nothing happens.
2 Sends an onfoot-packet to preserve weapon When the server sets a skin for the NPC on various occasions, the NPC sends an onfoot-packet so that its weapon is not lost (as seen by other players).
3 (Default) 2 Combined features: Sends an onfoot-packet to the server when a player streams in, and preserves the weapon when the server sets a skin for the NPC.


Return Values:
This function does not return any specific values.