Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
Why does this
PHP Code:
PHP Code:
|
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
You are likely using Podbot, right?
Due how a bot in Podbot is created (and how AMXX handles such forwards for a bot), the bot's private data is not yet initialized at this point. So it's not safe. |
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
Quote:
Quote:
|
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
A possible way is to hook the first spawn (there are 2 spawns when you arrive in the server (motd, not alive), and after you choose the team & you get into the game).
It's called in PutInServer after the private data has been initialized. Basically, Ham_Spawn, as pre, and checking is_user_alive if false or maybe more reliable to check m_bJustConnected offset. Just give a try anyway. |
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
Quote:
m_bJustConnected value is 500? |
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
The full offset seems to be 480. If you want to use it with get/set_pdata_int divide by 4, and the value is 120. To use the full offset get/set_pdata_bool is needed.
You could always use FPlayerCanRespawn as you did before instead of setting m_iNumSpawns. |
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
Quote:
|
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
m_bJustConnected is a bool, so naturally get/set_pdata_bool should be used. Unfortunately amxx 1.8.2 does not have such natives, so you either use Connor's stocks or convert the offset so it can be used directly with get/set_pdata_int(when possible).
|
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
Quote:
This is enough to work? PHP Code:
|
Re: Setting m_iNumRespawns + Supercede CS_RoundRespawn crashes?
Is 20 the offset for all mods?
Code:
{ |
| All times are GMT -4. The time now is 12:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.