07.06.2014, 17:30
I need to know as Get the ID of the Clicked Player (on TAB (players list))
How can i do this?
How can i do this?
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
new message[32];
format(message, sizeof(message), "You clicked on player %d", clickedplayerid);
SendClientMessage(playerid, 0xFFFFFFFF, message);
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source) {
if(source == CLICK_SOURCE_SCOREBOARD && playerid != clickedplayerid) { //If it comes from the scoreboard and the playerid doesn't equal the clicked playerid
new msg[128];
format(msg, sizeof(msg), "You have clicked the following player id: %d", clickedplayerid);
SendClientMessage(playerid, -1, msg); //Show who you clicked.
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
clickedPlayer = clickedplayerid;
return 1;
}