Include "Pawn.RakNet" plugin version :Mobile.inc

Started by Matite, May 23, 2023, 05:15 AM

Previous topic - Next topic

0 Members and 8 Guests are viewing this topic.

Matite



ATTENTION! Include the "Pawn.RakNet" plugin version "1.4.1" or higher!

You can include the "Pawn.RakNet" plugin in your project by using the following code:


#include <a_samp>
#include <Pawn.RakNet>

public OnGameModeInit()
{
    if (!PawnRakNet_Init(1.4.1))
    {
        printf("ERROR: Failed to load the Pawn.RakNet plugin! Please use version 1.4.1 or higher.");
        return 0;
    }

    // Other operations...

    return 1;
}



In the above example, we are checking the "Pawn.RakNet" plugin in the "OnGameModeInit" function. We load the plugin using the PawnRakNet_Init function and specify the desired version number (in this case, 1.4.1). If the plugin is successfully loaded, you can proceed with other operations. Otherwise, we display an error message to inform the user.

Please make sure to provide the correct path and version of the "Pawn.RakNet" plugin according to your project requirements. You can also modify this code based on your specific needs.



GİTHUB: https://github.com/katursis/Pawn.RakNet/releases