onplayerclickplayer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: onplayerclickplayer (
/showthread.php?tid=159670)
onplayerclickplayer -
ToPhrESH - 14.07.2010
well i was wondering if someone clicks this player it will show his stats. I was womndering how to do this
Re: onplayerclickplayer -
MikkelGutten - 14.07.2010
What kind of stats?
Re: onplayerclickplayer -
ToPhrESH - 14.07.2010
like kills, deaths, score, money
Re: onplayerclickplayer - TheInnocentOne - 14.07.2010
The first thing you'll have to do is start SAVING the stats. Most admin systems will do it perfectly.
Re: onplayerclickplayer -
ToPhrESH - 14.07.2010
ok thanks, I understand, then what should i do?
like i wanted it to show as if sending them client messages. i didnt know though how to do that
Re: onplayerclickplayer -
pierhs - 14.07.2010
You should add to OnPlayerClickPlayer function something like this:
pawn Код:
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(clickedplayerid, name, sizeof(name));
format(string, sizeof(string), "Name: %s, Kills: %d, Deaths: %d", name, Kills[clickedplayerid], Deaths[clickedplayerid]);
SendClientMessage(playerid, 0xFFFFFF00, string);
This is an example, use your own variables for Kills and Deaths and whatever