Where to place this?
#7

pawn Code:
new msg[MAX_PLAYERS]; // add this to the top of your code
              if(IsPlayerInRangeOfPoint(playerid,40.0,-2013.1947,-61.9978,35.3203) && IsPlayerInAnyVehicle(playerid))
      {  if( msg[playerid] == 0){
         GetPlayerSpeed(playerid,true);
         new string[128];
         new pName[MAX_PLAYER_NAME];
         GetPlayerName(playerid,pName,sizeof(pName));
         format(string,sizeof(string),"RadarInfo:%s(%d)-speed = %d",pName,playerid,GetPlayerSpeed(playerid,true));
         SendClientMessageToAll(COLOR_BLUE,string);
          msg[playerid] = 1;
      }
}
this will send the message only once, you should reset it at onplayerdeath and stuff so if they die and come back again or under onplayerstatechange add msg[playerid] = 0;
Reply


Messages In This Thread
Where to place this? - by Cjgogo - 13.06.2011, 15:31
Re: Where to place this? - by Skaizo - 13.06.2011, 15:32
Re: Where to place this? - by Iphone1234g - 13.06.2011, 15:42
Re: Where to place this? - by Cjgogo - 13.06.2011, 15:49
Re: Where to place this? - by xalith - 13.06.2011, 15:58
Re: Where to place this? - by Cjgogo - 13.06.2011, 16:06
Re: Where to place this? - by xalith - 13.06.2011, 17:02
Re: Where to place this? - by ricardo178 - 13.06.2011, 17:30

Forum Jump:


Users browsing this thread: 1 Guest(s)