SendClientMessage Bug - 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)
+--- Thread: SendClientMessage Bug (
/showthread.php?tid=479574)
SendClientMessage Bug -
Blackazur - 05.12.2013
Hello, i have a bug if i look now on my stats i get the message too that im looking at my own stats, but how to make that it only show when a different player looking at my stats?
Код:
format(str2, sizeof(str2),""chat""COL_GREEN" %s (%d) is looking at your stats using /stats [playerid].", PlayerName(playerid), playerid);
SendClientMessage(targetid,-1,str2);
Re: SendClientMessage Bug -
Misiur - 05.12.2013
Wrap that code in conditional comparing targetid with playerid.
AW: SendClientMessage Bug -
Blackazur - 05.12.2013
Can you do it for me because i dont understand so well?
Re: SendClientMessage Bug -
Tayab - 05.12.2013
pawn Код:
if(targetid == playerid)
{
format(str2, sizeof(str2),""chat""COL_GREEN" %s (%d) is looking at your stats using /stats [playerid].",PlayerName(playerid), playerid);
SendClientMessage(targetid,-1,str2);
}
Respuesta: SendClientMessage Bug -
[CG]Milito - 05.12.2013
pawn Код:
if(targetid != playerid)
{
new str2[80];
format(str2, sizeof(str2),""chat""COL_GREEN" %s (%d) is looking at your stats using /stats [playerid].", PlayerName(playerid), playerid);
SendClientMessage(targetid,-1,str2);
}