GetPlayerWantedLevel
From SA-MP Wiki
(Difference between revisions)
Revision as of 09:51, 13 April 2010 Mikep (Talk | contribs) ← Previous diff |
Current revision Connor Mead (Talk | contribs) |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|Gets the wanted level of a player.}} | {{Description|Gets the wanted level of a player.}} | ||
Line 34: | Line 33: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GetPlayerWantedLevel]] |
Current revision
Description:
Gets the wanted level of a player.
(playerid)
playerid | The ID of the player that you want to get the wanted level of. |
Return Values:
The player's wanted level.
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/getmywantedlevel", true) == 0) { // Gets the current wanted level, saves it in the variable wantedlevel //and then tells the player his wanted in a client message. new wantedlevel; wantedlevel = GetPlayerWantedLevel(playerid); new tmp[64]; format(tmp, sizeof(tmp), "Your current wanted level is: %i", wantedlevel); SendClientMessage(playerid, 0xFF0000FF, tmp); return 1; } return 0; }
[edit]
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetPlayerWantedLevel: Set a player's wanted level.
- PlayCrimeReportForPlayer: Play a crime report for a player.