Gpci

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 09:56, 4 March 2017
Djole1337 (Talk | contribs)
(gpci return string is always 40 char long.)
← Previous diff
Current revision
OstGot (Talk | contribs)
(Wrong links)
Line 28: Line 28:
{{tip|This function may come in handy to easily get someone's GPCI}} {{tip|This function may come in handy to easily get someone's GPCI}}
 +{{Example}}
<pawn> <pawn>
ReturnGPCI(iPlayerID) ReturnGPCI(iPlayerID)
Line 44: Line 45:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
- 
-[[de:AttachTrailerToVehicle]] 
-[[fr:AttachTrailerToVehicle]] 
-[[ru:AttachTrailerToVehicle]] 

Current revision



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