In need of help [rep+++]
#1

How can I make the player markers in minimap shown when a player is near and not to all the map?
Reply
#2

pawn Код:
forward SetPlayerMakerForAllEx(Float: distance); public SetPlayerMakerForAllEx(Float: distance)
{
    new players =  GetMaxPlayers();
    static Float:X, Float:Y, Float:Z;
    for(new i; i != players; ++i)
    {
        GetPlayerPos(i, X,Y,Z);
        for(new j; j != i;  ++j)
        {
            if(IsPlayerInRangeOfPoint(j, X, Y, Z))
            {
                SetPlayerMarkerForPlayer(i, j, GetPlayerColor(j));
            }
            else
            {
                SetPlayerMakerForPlayer(i, j, GetPlayerColor(j) & 0xFFFFFF00);
            }
        }
    }
        SetTimerEx("SetPlayerMakerForAllEx", "f", distance);
}

OnGameModeInit
pawn Код:
SetPlayerMakerForAllEx(DISTANCE);
Not Tested.
Reply
#3

In
pawn Код:
public OnPlayerGameModeInit()
Callback put

pawn Код:
ShowPlayerMarkers(2);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)