OnPlayerClickPlayer

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:02, 21 April 2014
MP2 (Talk | contribs)

← Previous diff
Revision as of 19:46, 23 April 2014
Ikkentim (Talk | contribs)
(Added return value)
Next diff →
Line 9: Line 9:
{{Param|clickedplayerid|The ID of the player that was clicked on.}} {{Param|clickedplayerid|The ID of the player that was clicked on.}}
{{Param|source|The [[Click Sources|source]] of the player's click.}} {{Param|source|The [[Click Sources|source]] of the player's click.}}
 +
 +{{NoReturnCallback}}
{{note|There is currently only one 'source' (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future.}} {{note|There is currently only one 'source' (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future.}}

Revision as of 19:46, 23 April 2014



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


Description:

Called when a player double-clicks on a player on the scoreboard.


Parameters:
(playerid, clickedplayerid, source)
playeridThe ID of the player that clicked on a player on the scoreboard.
clickedplayeridThe ID of the player that was clicked on.
sourceThe source of the player's click.


Return Values:

This callback does not handle returns.


Image:32px-Ambox_warning_orange.png

Note

There is currently only one 'source' (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future.


Example Usage:

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new message[32];
    format(message, sizeof(message), "You clicked on player %d", clickedplayerid);
    SendClientMessage(playerid, 0xFFFFFFFF, message);
    return 1;
}

Related Functions

The following functions might be useful, as they're related to this callback in one way or another.

In other languages