Stock help
#1

I made a stock to check if player is near a cop:

pawn Код:
stock IsPlayerNearALawEnforcement(playerid)
{
    new team = GetPlayerTeam(playerid);

    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);

    foreach (new i : Player)
    {
        if (i != playerid)
        {
            if (team != gTeam(i) == TEAM_COP)
            {
                if (IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
                {
                    return true;
                }
            }
        }
    }

    return false;
}
But i want to add radius to this stock, so i can use it like:

IsPlayerNearALawEnforcement(playerid, 20)

How?
Reply


Messages In This Thread
Stock help - by KinderClans - 26.08.2018, 12:11
Re: Stock help - by DelK - 26.08.2018, 12:22
Re: Stock help - by Lokii - 26.08.2018, 12:37
Re: Stock help - by KinderClans - 26.08.2018, 13:39
Re: Stock help - by Lokii - 26.08.2018, 13:51
Re: Stock help - by KinderClans - 26.08.2018, 13:54
Re: Stock help - by Lokii - 26.08.2018, 14:01
Re: Stock help - by KinderClans - 26.08.2018, 14:02
Re: Stock help - by Lokii - 26.08.2018, 14:15
Re: Stock help - by KinderClans - 26.08.2018, 14:16

Forum Jump:


Users browsing this thread: 1 Guest(s)