How to know where player aiming to another player coordinates?
#3

Can you test this? im not sure, since i haven't used GetPlayerCameraFrontVector function before
pawn Код:
stock IsPlayerAming(playerid)
{
    new Float:AX, Float:AY, Float:AZ;
    GetPlayerCameraFrontVector(playerid, AX, AY, AZ);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new Float:iX, Float:iY, Float:iZ;
        GetPlayerPos(i, iX, iY, iZ);
        if(AX > (iX+5) && AY > (iY+5) && AZ > (iZ+5)) return 1;
    }
    return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)