SendClientMessage Bug
#1

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);
Reply
#2

Wrap that code in conditional comparing targetid with playerid.
Reply
#3

Can you do it for me because i dont understand so well?
Reply
#4

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);
}
Reply
#5

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);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)