Gpci

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:42, 1 August 2017
OstGot (Talk | contribs)

← Previous diff
Current revision
Freaksken (Talk | contribs)
(Add notes from forums)
Line 5: Line 5:
{{Description|Fetch the GPCI of a user, this is linked to their SAMP/GTA on their computer.}} {{Description|Fetch the GPCI of a user, this is linked to their SAMP/GTA on their computer.}}
- 
-{{note2|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}} {{Parameters|playerid, string[], length}}
Line 14: Line 12:
{{Returns|This function will return the string value of a user's GPCI}} {{Returns|This function will return the string value of a user's GPCI}}
 +
 +
 +{{note2|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.}}
{{note2|You must add 'native gpci(playerid, serial[], len);' at the top of your script before using any GPCI functions}} {{note2|You must add 'native gpci(playerid, serial[], len);' at the top of your script before using any GPCI functions}}
 +
 +{{notes|
 +* It is a non-reversible (lossy) hash derived from information about your San Andreas installation path.
 +* It is not a unique ID.
 +* It was added to assist owners of large servers who deal with constant attacks from cheaters and botters.
 +}}
{{Example}} {{Example}}

Current revision


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.


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

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.


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


Image:32px-Ambox_warning_orange.png

Notes

  • It is a non-reversible (lossy) hash derived from information about your San Andreas installation path.
  • It is not a unique ID.
  • It was added to assist owners of large servers who deal with constant attacks from cheaters and botters.


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