Quote:
Originally Posted by ApolloScripter
Hello binnyl, I don't know how exactly SetPlayerMarkerForPlayer works, but I have a similar system, but I used SetPlayerMapIcon to put an icon for all players of the same clan.
The difference is that SetPlayerMapIcon makes it possible to change the constant style to appear on every radar, or just in your field of view.
The problem is that for each Map Icon will need to get the position of the player, but if you are interested follow the steps below and put them in your code, which maybe will work perfectly.
pawn Code:
new iconMapPlayerCount[MAX_PLAYERS]; //Set the variable to Map Icon Count
forward TeamRadar(playerid); public TeamRadar(playerid) { if(IsACop(playerid)) { foreach(new i : Player) { if(IsACop(i)) { if(IsPlayerConnected(i)) { new Float:tg_x, tg_y, tg_z; //Set variables to target coordinates GetPlayerPos(i, Float:tg_x, Float:tg_y, Float:tg_z); //Get target pos SetPlayerMapIcon(playerid, iconMapPlayerCount[playerid], Float:tg_x, Float:tg_y, Float:tg_z, 0, 0x59f060FF, MAPICON_GLOBAL); //Add a icon to the target position iconMapPlayerCount[playerid]++; //Increment the player count icon id } else { RemovePlayerMapIcon(playerid, iconMapPlayerCount[playerid]); //Remove the icon if the target disconnect } } }
iconMapPlayerCount[playerid] = 0; //Set the count to 0 } }
I didn't have time to test the operation, but if you use it and some error occurs, just call me.
EDIT NOTE: The problem with this Icon is that only 100 can be used.
|
I'm already uses SetPlayerMapIcon for a lot of stuff
Even had to use a streammer to don't get to the 100
SetPlayerMarkerForPlayer was made for it
Idk what happen if i'm missing something or if it is bugged already
Anyways, ty to your try, i rep you