event crash problem
Hi, I also have a problem that I can't deal with.
If the function is as follows: PHP Code:
playerspawn: PHP Code:
I specify that if no player has weapons at the end of the round in hand, the server does not fall. But if he has a knife, the server falls. |
Re: event crash problem
I'm wondering if it works if you try this... (not tested)
PHP Code:
|
Re: event crash problem
Quote:
|
Re: event crash problem
Try RegConsoleCmd of a test command of each piece individually.
I have seen some games/mods that don't handle EquipPlayerWeapon correctly and crash most of the time. Then in some cases, RemovePlayerItem can also crash. I am not sure what is in RemoveAllWeapons(int client) but if that is what is causing the crash, you could try the m_hMyWeapons offs with something like this: Code:
void RemoveAllWeapons(int client) ClientCommand("use %s",weaponclass); If ClientCommand is blocked in the game, then you could try setting all the properties required to force equip an item through m_hActiveWeapon on client, m_hWeapon on m_hViewModel from client. Then check the m_fFlags, m_fEffects on each to match an equipped weapon. |
Re: event crash problem
Quote:
|
Re: event crash problem
It is possible that either the EquipPlayerWeapon or ClientCommand is too soon for the weapon to properly initialize. If you make a 0.1 timer, it should fix that.
It could be something like this: Code:
After GivePlayerItem Code:
Handle dp = CreateDataPack(); |
Re: event crash problem
PHP Code:
|
All times are GMT -4. The time now is 07:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.