PlayCrimeReportForPlayer

From SA-MP Wiki

Jump to: navigation, search


PlayCrimeReportForPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Description:

This function plays a crime report for a player - just like in single-player when CJ commits a crime.


Parameters:
(playerid, suspectid, crimeid)
playeridThe ID of the player that will hear the crime report.
suspectidThe ID of the suspect player whom will be described in the crime report.
crimeidThe crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crimeid).


Return Values:

This function does not return any specific values.


Example Usage:

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/suspect"))
    {
        PlayCrimeReportForPlayer(playerid, 0, 16);
        SendClientMessage(playerid, 0xFFFFFFFF, "ID 0 committed a crime (10-16).");
        return 1;
    }
    return 0;
}

Related Functions

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

Personal tools
Navigation
Toolbox
In other languages