RequestClass: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 5: Line 5:
example=<source lang="lua">
example=<source lang="lua">
</source>|
</source>|
retvals=The function returns true on success, false when npc is not spawned or the parameter provided is not 1,-1 or 0.|
retvals=The function returns true on success, false when npc is already spawned or the parameter provided is not 1,-1 or 0.|
relfuncs=*[[RequestSpawn]]
relfuncs=*[[RequestSpawn]]
*[[OnNPCClassSelect]]
*[[OnNPCClassSelect]]
}}
}}

Latest revision as of 18:34, 25 May 2023


Description:
This will send a request to server to show class for spawning.


Parameters:

(relativeclass=CLASS_CURRENT)

relativeclass : Optional parameter. Values can be CLASS_PREVIOUS, CLASS_NEXT. If former value is used, then the server will show previous class. If latter value is used, then server will show next class. If paramter omitted or CLASS_CURRENT is used, the server will show the current class( before npc was dead) or 0 (while connecting)


Return Values:
The function returns true on success, false when npc is already spawned or the parameter provided is not 1,-1 or 0.


Example

Related Functions

The following functions may be helpful as they relate to this function in one way or another.