Gpci

From SA-MP Wiki

Jump to: navigation, search

gpci

Image:Farm-Fresh text lowercase.png Note: This function name starts with a lowercase letter.


Description:

Fetch the GPCI of a user, this is linked to their SAMP/GTA on their computer.


Image:32px-Circle-style-warning.png

Important
Note

A player's GPCI is NOT UNIQUE, some players may have similar or the same GPCI, don't ban solely due to a GPCI match.


Parameters:
(playerid, string[], length)
playeridThe ID of the player to fetch their GPCI.
string[]String to store the fetched GPCI in.
lengthAssigned size of the string, should use sizeof()


Return Values:

This function will return the string value of a user's GPCI


Image:32px-Circle-style-warning.png

Important
Note

You must add 'native gpci(playerid, serial[], len);' at the top of your script before using any GPCI functions


Example Usage:

#if !defined gpci
    native gpci(playerid, serial[], len);
#endif
 
new szSerial[41]; // 40 + \0
 
gpci(iPlayerID, szSerial, sizeof(szSerial));
return szSerial;
Tip

Image:Light_bulb_icon.png

This function may come in handy to easily get someone's GPCI


Example Usage:

ReturnGPCI(iPlayerID)
{
    new 
        szSerial[41]; // 40 + \0
 
    gpci(iPlayerID, szSerial, sizeof(szSerial));
    return szSerial;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

  • GetNetworkStats: Gets the servers networkstats and saves it into a string.
Personal tools
Navigation
Toolbox