SendClientMessage
#1

Hi...
how can I make this message only show once?
it always sends as many messages as there are players on the server

Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i=0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i)){
new Float:px, Float:py, Float:pz;
if(IsPlayerInRangeOfPoint(i, 3.0, x, y, z);
SendClientMessage(playerid, grey, "blablabla");
SendClientMessage(i, grey, "blablabla2");
}
}
Reply
#2

Код:
new Float:x, Float:y, Float:z;
new Float:px, Float:py, Float:pz;
GetPlayerPos(playerid, x, y, z);
for(new i=0; i < MAX_PLAYERS; i++)
{
   if(IsPlayerConnected(i)&&i!=playerid){
    if(IsPlayerInRangeOfPoint(i, 3.0, x, y, z))
    {
       SendClientMessage(playerid, grey, "blablabla");
       SendClientMessage(i, grey, "blablabla2");
    }
}
}
//note, this code doesn't use px, py and pz. Don't know why you created them, but there you go.
Reply
#3

ty..I created it because I got some more steps in it and i also need the pos of the player in the range later
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)