ReqeustClassAbs

From NPC for VCMP 0.4 Servers
Revision as of 09:17, 29 December 2023 by 127.0.0.1 (talk) (/)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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


Description:
Sets the absolute class to spawn. If npc is dead, then it will choose the specified class immediately.


Parameters:

(classID)

classID : The ID of the class (0,1,2,..) to spawn at.


Return Values:
The function returns true on success and null on error (classID greater than 49 or npc not connected)

Important Note:
This function can also be used when npc is not dead:

RequestClassAbs(8) ;//Will spawn at class 8 next time npc dies
..
Suicide()  //doing suicide 
SetTimerEx("RequestClass",4000,1);  //call requestclass after 4 seconds

Example

RequestClassAbs(9) ;//Choose class with ID = 9.

Related Functions

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