Map Icons over players
#1

Its easy to put a map icon over a building or a specific point on the map sure enough, but could anyone assist me in placing an icon over a player? Say if the player is driving, the icon will stay on top of him/her on the map at all times.

Im familiar with SetPlayerMapIcon, and i just need help with adding in putting one over multiple players, meaning how can i tell the game to give a person a random icon id between 20 and 30, i really dont want more than 10 icons on the map of other players... no what im saying?
Reply
#2

Код:
forward IconStream(playerid);

public IconStream(playerid)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
new randicon = random(30);
SetPlayerMapIcon(playerid,1,X,Y,Z,randicon,0);
}
also, put in omgamemode init:

Код:
SetTimer("IconStream",1000,true);
Reply
#3

don't forget to keep removing them, else you will get a line of icons, and than ......... crash
Reply
#4

What will happen if there are more than 32 players? This will crash the srv again
Reply
#5

Quote:
Originally Posted by [DK
AzaxYo ]
What will happen if there are more than 32 players? This will crash the srv again
use a streamer
Reply
#6

Quote:
Originally Posted by Pandabeer1337
Quote:
Originally Posted by [DK
AzaxYo ]
What will happen if there are more than 32 players? This will crash the srv again
use a streamer
so whats the purpose of that script after that? we needs something like markers, but with icons
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)