Question Reguarding Playerspawn Event
I know the most efficient way of grabbing the playerspawn forward is though ham, but I have found that it is not always successful. I know that on new rounds, players who didn't die technically don't respawn, but I was curious if it is possible to grab the event on new rounds as well without using get_players. I was thinking of using ResetHUD, but will that work?
|
Re: Question Reguarding Playerspawn Event
Use ham_spawn post. In the forward, check if user alive and that will correctly hook spawn.
Untested PHP Code:
|
Re: Question Reguarding Playerspawn Event
That's exactly what I use.
RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1) |
Re: Question Reguarding Playerspawn Event
is_user_alive() is a must like said Bugsy. You use it, right?
|
Re: Question Reguarding Playerspawn Event
Quote:
Ham_Spawn is called. Look at multiplay gamerules : http://code.google.com/p/cs-sdk/sour..._gamerules.cpp Function : void CHalfLifeMultiplay::RestartRound() Is called at each new round. line 514 is called for each player : pPlayer->RoundRespawn(); |
Re: Question Reguarding Playerspawn Event
( Just a side-note you can use the search box, very useful like : http://www.google.com/codesearch?q=R...G=Search+Trunk )
|
Re: Question Reguarding Playerspawn Event
if (!is_user_alive(id) || !cs_get_user_team(id))
return Thanks for the link! |
| All times are GMT -4. The time now is 21:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.