Ok, once I saw your script, blocking player
"joinclass" command, it first look okey.
- Problem is, player would stay as
dead state in team, because it not have valid player class chosen.
Player need then repeat process...
I also tested, with SDKHook, to block player spawn.
- This work but it also break... player entity hierarchy. Player will turn dead, invisible ghost or something.
In these few days, I have tried practising to look game through IDA Disassembler and from "source" files, to understand how get right signatures or offsets.
I'm 99% sure, I managed to find solution, to block player spawn in
Counter-Strike: Source (for now only).
The function which I hooked is
PHP Code:
bool CCSGameRules::FPlayerCanRespawn( CBasePlayer *pBasePlayer )
Thanks to @Drifter321 and @peace-maker, maintaining DHOOKS extension. It's very powerful when you know what to do.
https://forums.alliedmods.net/showth...86#post2588686
Required!
DHOOKS2
https://github.com/peace-maker/DHooks2/releases
Or regular DHOOKS, I have not tested.
What this plugin do:
- When ever player in spectator team (1), switch to team CT or T, can not spawn in current round, even there is
mp_freezetime + 20 seconds grace time.
- Plugin will start block when there at least two players in both team (include switching spectator in count as well)
You may experience server crash:
- Maybe offset value is wrong.
I have tested only in Windows.
- Future game update can change offset value and again, crash server or stop working.