Main Page: Difference between revisions
No edit summary |
No edit summary |
||
Line 40: | Line 40: | ||
* [[OnNPCClassSelect]] | * [[OnNPCClassSelect]] | ||
* [[OnServerShareTick]] | * [[OnServerShareTick]] | ||
*[[OnTimeWeatherSync]] | |||
==Constants== | ==Constants== | ||
* [[Bodypart| BodyParts]] | * [[Bodypart| BodyParts]] | ||
Line 63: | Line 64: | ||
* [[GetPlayerTeam]] | * [[GetPlayerTeam]] | ||
* [[GetPlayerSlotWeapon]] | * [[GetPlayerSlotWeapon]] | ||
* [[GetPlayerSlotAmmo]] | * [[GetPlayerSlotAmmo]] | ||
*[[GetPlayerSpeed]] | |||
*[[GetPlayerAction]] | |||
* [[WhereIsPlayer]] | * [[WhereIsPlayer]] | ||
== Modules == | == Modules == | ||
Line 95: | Line 98: | ||
* [[GetMyID]] | * [[GetMyID]] | ||
* [[QuitServer]] | * [[QuitServer]] | ||
== | ==General== | ||
* [[SendOnFootSyncData]] | * [[SendOnFootSyncData]] | ||
* [[SendOnFootSyncDataEx]] | * [[SendOnFootSyncDataEx]] | ||
Line 105: | Line 108: | ||
* [[FireSniperRifle]] | * [[FireSniperRifle]] | ||
* [[FireSniperRifleEx]] | * [[FireSniperRifleEx]] | ||
* [[ | * [[FireProjectile]] | ||
* [[SendShotInfo]] | * [[SendShotInfo]] | ||
* [[SendDeathInfo]] | * [[SendDeathInfo]] | ||
Line 114: | Line 117: | ||
* [[GetTickCount]] | * [[GetTickCount]] | ||
* [[GetClosestPlayer]] | * [[GetClosestPlayer]] | ||
* [[RequestClass]] | |||
* [[RequestSpawn]] | |||
== Functions used only in server scripts== | == Functions used only in server scripts== | ||
* [[ConnectNPC]] | * [[ConnectNPC]] | ||
Line 138: | Line 143: | ||
*[[WriteString]] | *[[WriteString]] | ||
==More== | ==More== | ||
==Pickup== | |||
*[[ClaimPickup]] | *[[ClaimPickup]] | ||
*[[IsPickupStreamedIn]] | *[[IsPickupStreamedIn]] | ||
Line 151: | Line 156: | ||
*[[OnPickupDestroyed]] | *[[OnPickupDestroyed]] | ||
*[[OnPickupUpdate]] | *[[OnPickupUpdate]] | ||
==Checkpoint== | |||
*[[OnCheckpointStreamIn]] | *[[OnCheckpointStreamIn]] | ||
*[[OnCheckpointDestroyed]] | *[[OnCheckpointDestroyed]] | ||
Line 161: | Line 167: | ||
*[[ClaimEnterCheckpoint]] | *[[ClaimEnterCheckpoint]] | ||
*[[ClaimExitCheckpoint]] | *[[ClaimExitCheckpoint]] | ||
*[[ | *[[GetCheckpointCount]] | ||
==Vehicle== | |||
*[[EnterVehicle]] | |||
*[[GetVehicleDriver]] | *[[GetVehicleDriver]] | ||
*[[GetVehicleModel]] | *[[GetVehicleModel]] | ||
Line 170: | Line 178: | ||
*[[GetVehicleHealth]] | *[[GetVehicleHealth]] | ||
*[[GetVehicleDamage]] | *[[GetVehicleDamage]] | ||
*[[ | *[[ExitVehicle]] | ||
*[[ExitVehicleEx]] | |||
==Objects== | |||
*[[IsObjectStreamedIn]] | *[[IsObjectStreamedIn]] | ||
*[[GetObjectModel]] | *[[GetObjectModel]] | ||
Line 181: | Line 191: | ||
*[[ClaimObjectShot]] | *[[ClaimObjectShot]] | ||
*[[GetObjectCount]] | *[[GetObjectCount]] | ||
== More == | == More == | ||
*[[NPC Installation]] | *[[NPC Installation]] |
Revision as of 05:53, 3 November 2023
Introduction
NPCs (Non Player Characters) or bots can be created in vcmp server. They can be created at ammunition stores, toolshop or mall. They can chat with players, send command to server. They can be used to play a previous recording like driving a car around an area repeatedly. Like normal players, they use server slot. Their intelligence can be scripted in separate squirrel scripts. These scripts with 'artificial intelligence' of NPC reside in npcscripts directory.
Each NPC run in its own process. The NPC scripts have functions as well as callbacks.
Since v1.5, adding an npc is simple as a call to ConnectNPC and if you do not want to give npc AI, the script parameter can be omitted.
04 February 2023: Hiding/Changing name of NPC In-Game New Plugin. see
28 August 2023: NPC v1.7 Beta 2 is released. (new) click here
08 October 2023: NPC v1.7 Beta 3 is released. (new) click here