Player is in range of player
#6

Not sure how you want it, but an example!
pawn Код:
CMD:cuff(playerid, params[])
{
    new
        id,
        id2
    ;
    if(sscanf(params, "uu", id, id2)) return SendClientMessage(playerid, -1, "Usage: /cuff <playerid1> <playerid2>");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player A is not connected");
    if(id2 == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player B is not connected");
    new
        Float: pos[ 3 ]
    ;
    GetPlayerPos(id2, pos[ 0 ], pos[ 1 ], pos[ 2 ]);
    if(IsPlayerInRangeOfPoint(id, 5.0, pos[ 0 ], pos[ 1 ], pos[ 2 ]))
    SendClientMessage(playerid, -1, "Player A is in range of player B!");
    return 1;
}
Reply


Messages In This Thread
Player is in range of player - by thistooshallpass93 - 09.04.2013, 14:18
Re: Player is in range of player - by MattyG - 09.04.2013, 15:16
Re: Player is in range of player - by MP2 - 09.04.2013, 15:18
Re: Player is in range of player - by Da_Noob - 09.04.2013, 15:19
Re: Player is in range of player - by Riddick94 - 09.04.2013, 15:21
Re: Player is in range of player - by Konstantinos - 09.04.2013, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)