Skip to content

Bug: Conflict between Pawn.RakNet and SetTeamCount function in OnGameModeInit #94

Open
@WeiduXx

Description

@WeiduXx

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

  1. Load the Pawn.RakNet plugin in your server
  2. In the OnGameModeInit callback, call SetTeamCount(any_value)
  3. Attempt to use Pawn.RakNet functionality (e.g., OnIncomingPacket callback)
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions