How to check if the suspect is in the players facing angle?
#1

pawn Код:
new suspect;
                        for (suspect=0;suspect<MAX_PLAYERS;suspect++)
                        {
                            if(IsPlayerFacingPlayer(playerid, suspect, 7.0))
                            {
                                 SendClientMessage(playerid,COLOR_WHITE,"He is standing infront of you");
                            }
                         }
It won't say He is standing infront of you.
Can you help please?
Reply
#2

Please?
Reply
#3

Where did you put that?
Reply
#4

something like this

Код:
new float:Angle, float:X,float:Y,float:X;

GetPlayerFacingAngle(playerid,Angle); or 
GetPlayerPos(playerid, X, Y, Z); and then later to set the other player facing angle 
SetPlayerFacingAngle(playerid, Angle);
SetPlayerFacingAngle(Targetid, X,Y,Z); thats just an example something like that might work
Reply
#5

Quote:
Originally Posted by GTAguillaume
Where did you put that?
I made a command,
pawn Код:
if (strcmp(cmd, "/checkplayer", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
                        new suspect;
                        for (suspect=0;suspect<MAX_PLAYERS;suspect++)
                        {
                            if(IsPlayerFacingPlayer(playerid, suspect, 7.0))
                            {
                                 SendClientMessage(playerid,COLOR_WHITE,"He is standing infront of you");
                            }
                         }
      }
      return 1;
    }
I just want to check the player that is standing infront of you, thank you for trying to help
Reply
#6

Quote:
Originally Posted by Kartowka
Quote:
Originally Posted by GTAguillaume
Where did you put that?
I made a command,
pawn Код:
if (strcmp(cmd, "/checkplayer", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
                        new suspect;
                        for (suspect=0;suspect<MAX_PLAYERS;suspect++)
                        {
                            if(IsPlayerFacingPlayer(playerid, suspect, 7.0))
                            {
                                 SendClientMessage(playerid,COLOR_WHITE,"He is standing infront of you");
                            }
                         }
      }
      return 1;
    }
I just want to check the player that is standing infront of you, thank you for trying to help
12 hours have been passed [I guess? ]
Reply


Forum Jump:


Users browsing this thread: