Notes |
|
|
Also add boolean "respawn now?". Defaults to false.
If it is false, then using SetPlayerClass is exactly equal to setting playerclass with console.
If it is true, then player is killed and respawned as new class immediately.
In a game mode with limited lives, e.g. Survival or LMS, life is not deducted.
SetPlayerClass(int player, str classname[, bool respawnNow]);
|
|
|
(0021342)
|
JaxOf7
|
2020-05-22 23:47
|
|
To add onto this
I've been using ConsoleCommand("Playerclass (class)") in some of my mods.
Specifically, having a user variable for each team designating a class for each team so it automatically sets your class upon joining that team.
(ex: Team0 Ghostbuster, Team1 Jitterskull)
Thing is though, this kicks you for user info flood if you're not careful.
Even kicks if you are careful.
Would appreciate something that never kicks players. |
|
|
|
3.1 adds the ACS function "SetPlayerClass" which allows modders to set a specifc class for a player, with the option of also forcing them to respawn right away. This function also takes into account if the player can use the given class, depending on whether or not it's available to their current team. |
|
|
|
Marking this as resolved since it does replace the use of console command. Any issues regarding the function have been reported. |
|