Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[Include] GPCI Banning

$
0
0
GPCI Banning

If you have a problem with gpci banning, because 2 different players have same serial-number, you can use this simple trick:

Code:

#include <a_samp>

native gpci(playerid, serial[], maxlen);

public OnPlayerConnect(playerid)
{
        new pSerial[41], pIP[16];
        gpci(playerid, pSerial, sizeof(pSerial));

        printf("[Serial-IP]: %s", pSerial[GetPlayerIp(playerid, pIP, sizeof(pIP))]);

        // -- Example of use --
        if(!strcmp(pSerial[GetPlayerIp(playerid, pIP, sizeof(pIP))], "BED5DDA5E801C5AC4CF92FE5DECA08F"))
        {
            Kick(playerid);
        }
        return 1;
}

This is a combination of the serial number and IP of the player. It may be helpful if we want to serial-ban only one player.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>