Description
Conflict Between Pawn.RakNet and SetTeamCount Function
Issue Description
I have discovered a conflict between the Pawn.RakNet plugin and the SA-MP native SetTeamCount
function. When SetTeamCount
is called within the OnGameModeInit
callback, the Pawn.RakNet plugin becomes completely non-functional - it fails to capture packets and all related functionality stops working.
Steps to Reproduce
- Load the Pawn.RakNet plugin in your server
- In the
OnGameModeInit
callback, callSetTeamCount(any_value)
- Attempt to use Pawn.RakNet functionality (e.g.,
OnIncomingPacket
callback) - Observe that Pawn.RakNet features are completely non-functional
Environment Information
SA-MP Server Version: 0.3.7-R2
Pawn.RakNet Version: [v1.6.0]
Operating System: [Windows]
Sample Code
#include <a_samp>
#include <Pawn.RakNet>
public OnGameModeInit()
{
// This line causes Pawn.RakNet to stop working
SetTeamCount(10);
// Other initialization code...
return 1;
}
public OnIncomingPacket(playerid, packetid, BitStream:bs)
{
// This callback will not be triggered
return 1;
}
Temporary Workaround
Currently, the only solution is to avoid calling SetTeamCount in OnGameModeInit or to avoid using this function entirely.
Additional Information
This issue appears to be related to plugin hook function conflicts, as the problem only occurs when this specific function (SetTeamCount) is called within a specific callback (OnGameModeInit).
I have searched through the existing issues and could not find any reports of this problem.
Thank you for your attention to this matter.