Raised This Month: $ Target: $400
 0% 

Block Player Spawn on NewRound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-21-2015 , 08:20   Re: Block Player Spawn on NewRound
Reply With Quote #5

You should hook CHalfLifeMultiplay::FPlayerCanRespawn and make it always return false(OrpheuSetReturn). It's a virtual function, so you can hook it from g_pGameRules object, with orpheu.
https://github.com/Arkshine/CSSDK/bl...ules.cpp#L2599

Here's how the function works:
Spoiler


I was going to say it's enough to set m_iNumSpawns to 1 in HLTV to block players from spawning, but HLTV is fired right before the offset is set to 0 by the game, it will overwrite your value and it won't work.
__________________

Last edited by HamletEagle; 12-21-2015 at 08:23.
HamletEagle is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode