Player near another player
#3

You can combine GetPlayerPos with IsPlayerInRangeOfPoint, like this

pawn Код:
CMD:givemoney(playerid, params[])
{
    new amount, Float:Pos[3];
    if(sscanf(params, "ui", targetid, amount)) return SendClientMessage(playerid, -1, "[USAGE] /givemoney <playerid> <amount>");
    GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
    if(IsPlayerInRangeOfPoint(playerid, 5, Pos[0], Pos[1], Pos[2])
    {
        GivePlayerMoney(targetid, amount);
        GivePlayerMoney(playerid, -amount);
    }
    return 1;
}
Reply


Messages In This Thread
Player near another player - by SumX - 14.08.2012, 04:55
Re: Player near another player - by BigAl - 14.08.2012, 05:04
Re: Player near another player - by IceMeteor - 14.08.2012, 05:05
Re: Player near another player - by SumX - 14.08.2012, 06:10
Re: Player near another player - by Kindred - 14.08.2012, 06:12

Forum Jump:


Users browsing this thread: 2 Guest(s)