21.02.2011, 17:07
(
Последний раз редактировалось captainjohn; 22.02.2011 в 10:31.
)
I have noticed that quite alot of people are having problems with adding icons to there map.
I will teach you.
First of all open your filterscript you are wanting to add your map icon to.
Then search for this.
Then anywere in this, we will add the map icons, I like to add them at the top of it.
First of all, we make a new line under OnPlayerConnect.
Then add this
After were it says playerid, hit your spacebar once, to create a space.
Now add your ID you want (in my case it is ID 1) This ID is used in if you want to remove your map icon or make a command to remove the map icon. After you enter your ID put a comma next to it and then hit the spacebar again.
Please remember, if you are using more than one icon, to change the ID each time.
For example:
So now it will look like this.
Now we want to add the icons location.
In my case I am going to add the map icon at Bayside Marina.
The location is divided down into 3 categories.
Float X
Float Y
Float Z
Here is mine.
Float X = -2185.1511
Float Y = 2412.7346
Float Z = 5.1563
Now we are going to add the locations in our icon code.
After the space which we created above, we will add Float x.
Once again put a comma and hit space bar again.
Now for Float Y. Repeat the above step but add your Float Y. (don't forget to add the comma and space)
Now for Float Z, just repeat the above step.
Again add the comma and space.
Now we have added the location into it, we will go onto the ID for your icon.
Visit this webpage for a list of icons (with thumbnails) https://sampwiki.blast.hk/wiki/MapIcons . Choose your ID you want.
For this tutorial I will choose, ID number 9 (boat yard). Now this ID is important, without the ID you won't get the icon in-game.
Once you have your ID, put the ID after Float Z.
Remember to add your comma and space.
Now the last bit.
After the icon ID, put a 0 there. If you are using icon ID 1 (white square), you can add different numbers which will resemble different colours for the white square. I won't go into all the colours, as I don't see a point.
Now your code should look like this.
Now all you need to do is add another space and a closed bracet ) following a semi-colon ;
Now we have finished.
I hope I helped you, who needed help on map icons.
I will teach you.
First of all open your filterscript you are wanting to add your map icon to.
Then search for this.
pawn Код:
public OnPlayerConnect(playerid)
{
First of all, we make a new line under OnPlayerConnect.
Then add this
pawn Код:
SetPlayerMapIcon(playerid,
Now add your ID you want (in my case it is ID 1) This ID is used in if you want to remove your map icon or make a command to remove the map icon. After you enter your ID put a comma next to it and then hit the spacebar again.
Please remember, if you are using more than one icon, to change the ID each time.
For example:
pawn Код:
SetPlayerMapIcon(playerid, 1,
SetPlayerMapIcon(playerid, 2,
SetPlayerMapIcon(playerid, 3,
pawn Код:
SetPlayerMapIcon(playerid, 1,
In my case I am going to add the map icon at Bayside Marina.
The location is divided down into 3 categories.
Float X
Float Y
Float Z
Here is mine.
Float X = -2185.1511
Float Y = 2412.7346
Float Z = 5.1563
Now we are going to add the locations in our icon code.
After the space which we created above, we will add Float x.
Once again put a comma and hit space bar again.
pawn Код:
SetPlayerMapIcon(playerid, 1, -2185.1511,
pawn Код:
SetPlayerMapIcon(playerid, 1, -2185.1511, 2412.7346,
Again add the comma and space.
pawn Код:
SetPlayerMapIcon(playerid, 1, -2185.1511, 2412.7346, 5.1563,
Visit this webpage for a list of icons (with thumbnails) https://sampwiki.blast.hk/wiki/MapIcons . Choose your ID you want.
For this tutorial I will choose, ID number 9 (boat yard). Now this ID is important, without the ID you won't get the icon in-game.
Once you have your ID, put the ID after Float Z.
Remember to add your comma and space.
pawn Код:
SetPlayerMapIcon(playerid, 1, -2185.1511, 2412.7346, 5.1563, 9,
After the icon ID, put a 0 there. If you are using icon ID 1 (white square), you can add different numbers which will resemble different colours for the white square. I won't go into all the colours, as I don't see a point.
Now your code should look like this.
pawn Код:
SetPlayerMapIcon(playerid, 1, -2185.1511, 2412.7346, 5.1563, 9, 0
pawn Код:
SetPlayerMapIcon(playerid, 1, -2185.1511, 2412.7346, 5.1563, 9, 0 );
I hope I helped you, who needed help on map icons.