In need of help [rep+++] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: In need of help [rep+++] (
/showthread.php?tid=308992)
In need of help [rep+++] -
KosmasRego - 05.01.2012
How can I make the player markers in minimap shown when a player is near and not to all the map?
Re: In need of help [rep+++] -
[O.z]Caroline - 05.01.2012
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.
Re: In need of help [rep+++] -
TheArcher - 05.01.2012
In
pawn Код:
public OnPlayerGameModeInit()
Callback put