Getting the closest player
#1

Ok so I want the command to pick up on a player next to you.. This is what I've got right now

Код:
new policecheck;
policecheck = GetPlayerTeam(playerid);

if(!strcmp(cmd, "/tazer", true))
 {
 if(policecheck = TEAM_Police)
 {
  new criminal = ReturnUser(tmp);
  GetPlayerName(criminal, criminaltazed, sizeof(criminaltazed));
  new playersdistance;
  playerdistance = GetDistanceBetweenPlayers(playerid,criminal);
  if(playerdistance >4)
   {
   TogglePlayerControllable(criminal, 0);
   }
return 1;
}
Can some one help me out? I was also thinking of using:

Код:
GetClosestPlayer
Reply


Messages In This Thread
Getting the closest player - by jamie009 - 24.02.2010, 18:15

Forum Jump:


Users browsing this thread: 1 Guest(s)