SA-MP-Plus icon indicating copy to clipboard operation
SA-MP-Plus copied to clipboard

Game crashes after spas shot.

Open L30N3 opened this issue 9 years ago • 0 comments

Greetings.

Like your fabulous plugin, but I have found one trouble. My game crashes when I do spas or sawn-off shotgun shot (Exception 0xC0000005 at 0x55250649). I found a reason of this problem in Client/Network.cpp at this code:

unsigned int SendRPC(unsigned short usRPCId, RakNet::BitStream* pBitStream, PacketPriority priority, PacketReliability reliability, char cOrderingChannel)
    {
        if (!IsConnected())
            return 0;

        CLog::Write("Sent packet: %i, size: %i byte(s)", usRPCId, pBitStream->GetNumberOfBytesUsed());
        CLog::bytesSent += pBitStream->GetNumberOfBytesUsed();

        return pRakClient->SendRPC(usRPCId, *pRakClient->GetRemoteAddress(), pBitStream, priority, reliability, cOrderingChannel);
    }

If I will comment this part of code, the crash will gone:

//CLog::Write("Sent packet: %i, size: %i byte(s)", usRPCId, pBitStream->GetNumberOfBytesUsed());
        //CLog::bytesSent += pBitStream->GetNumberOfBytesUsed();

I do not know a reason of the problem, because I am begginer at coding, so I think you can fix this problem. Sorry for my bad English.

Regards, L30N3.

L30N3 avatar May 01 '16 10:05 L30N3