09.04.2013, 15:24
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;
}