SetPlayerClass: Difference between revisions

m
Added an example
No edit summary
Tag: Source edit
m (Added an example)
Line 14: Line 14:


== Examples ==
== Examples ==
{{noexamples}}
This script is used in the context of a custom menu and respawns the player as the custom player class "Scout" when the option is selected. Integer 'pNum' is used to track the activator's player number before executing.<syntaxhighlight lang="c" line="1">
 
Script 1 (void) NET
{
int pNum = PlayerNumber();
SetPlayerClass(pNum, "Scout", true);
}
</syntaxhighlight>
[[Category:ACS functions]]
[[Category:ACS functions]]