RequestSpawn

From NPC for VCMP 0.4 Servers
Revision as of 16:38, 24 May 2023 by Habi (talk | contribs) (Created page with "{{Welcome| desc=This will send a request to server for spawning in the currently selected class.| params=<syntaxhighlight lang="lua">NoParams</syntaxhighlight> example=<source lang="lua"> function OnNPCClassSelect() { if(GetPlayerTeam(GetMyID())==2) RequestSpawn(); return 1 } </source>| note= Inside the function, use Team, color, position to check if the class matches as it is not possible to obtain the class id directly.| relfuncs=*RequestClass *OnNP...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Description:
This will send a request to server for spawning in the currently selected class.


Parameters:

NoParams

example=

function OnNPCClassSelect()
{
    if(GetPlayerTeam(GetMyID())==2)
      RequestSpawn();
    return 1
}


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

Important Note:
Inside the function, use Team, color, position to check if the class matches as it is not possible to obtain the class id directly.


Related Functions

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