Block player respawn in CS:S
Hello, sorry for my bad english :)
In a while ago I found a way of how to block player respawn. It can be done by using a CS_SwitchTeam function on a spectator. To give player ability to respawn back CS_RespawnPlayer is only needed. I wrote a little test code that will block respawn when client is just joined a team and will spawn him on next round: PHP Code:
|
Re: Block player respawn in CS:S
Yes, I found it! :)
The answer was so simple. To block player respawn we can simply Hook "joinclass" command. Player will not spawn if he didn't select a class. :) Added it to antirejoin plugin. |
Re: Block player respawn in CS:S
There's a "joinclass" command in CS:S?
|
Re: Block player respawn in CS:S
Quote:
|
Re: Block player respawn in CS:S
Quote:
p.s. If player already choosed the class we can set it back to 0 by changing m_iClass to 0 and he will not spawn next round. |
Re: Block player respawn in CS:S
Typing "joinclass" into my console says it's an Unknown Command.
|
Re: Block player respawn in CS:S
Quote:
|
Re: Block player respawn in CS:S
|
Re: Block player respawn in CS:S
Yes, I do. :) This is a command like "drop" or "jointeam" (or any radio command) that are actually a player's actions so only client can send them when he are playing on the server.
p.s. when I wrote about "server side command" I mean that client can send it only when he on the server |
Re: Block player respawn in CS:S
Quote:
|
| All times are GMT -4. The time now is 20:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.