Need Help IconMap - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help IconMap (
/showthread.php?tid=179093)
Need Help IconMap -
xinix000 - 25.09.2010
pawn Код:
public OnPlayerConnect(playerid)
{
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
SetPlayerMapIcon(playerid, 31, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 31, 0 );
}
if(HouseInfo[h][hOwned] == 1)
{
SetPlayerMapIcon(playerid, 32, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 32, 0 );
}
}
}
it show only first house it now show all of the house
how to fix it ??
Re: Need Help IconMap -
Conroy - 25.09.2010
pawn Код:
#define MAX_HOUSES 500
public OnPlayerConnect(playerid)
{
for(new h; h <= MAX_HOUSES; h++)
{
if(HouseInfo[h][hOwned] == 0)
{
SetPlayerMapIcon(playerid, 31, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 31, 0 );
}
if(HouseInfo[h][hOwned] == 1)
{
SetPlayerMapIcon(playerid, 32, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 32, 0 );
}
}
}
Re: Need Help IconMap -
Rachael - 25.09.2010
The second parameter of the SetPlayerMapIcon function is "iconID", and must be a value from 0-99 ( unless you use a streamer )
The reason your player is only seeing the first icon, is because if you set another Map Icon to the same iconID, it will replace the first.
If you have less than 99 houses I guess you could use 'h' as the iconID.
The second to last parameter is the "icon type', I think you have the two confused.
[edit] I just noticed you have 500 as maximum houses, if you want each house to have an icon, you will need to use a streamer.
Re: Need Help IconMap -
Mike_Peterson - 25.09.2010
Quote:
Originally Posted by Rachael
The second parameter of the SetPlayerMapIcon function is "iconID", and must be a value from 0-99 ( unless you use a streamer )
The reason your player is only seeing the first icon, is because if you set another Map Icon to the same iconID, it will replace the first.
If you have less than 99 houses I guess you could use 'h' as the iconID.
use a streamer.
|
errm, i see his iconid is 31 - 32 not 31-31 so this is wrong...
the second last parameter is indeed markertype but it doesnt matter if u put same iconid as markertype
but still what u said about double icon id is not true.
Re: Need Help IconMap -
Rachael - 25.09.2010
Considering 31 is the icon type for a green house, and 32 is the icon type for a red house, I actually don't think I am wrong.
Re: Need Help IconMap -
xinix000 - 25.09.2010
pawn Код:
for(new h; h < sizeof(HouseInfo); h++)
{
SetPlayerMapIcon(playerid, h, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 31, 0 );
}
I use this and it show but show only 0-100 and the other it not how to fix it ??
and how to use a streamer ??
Re: Need Help IconMap -
Rachael - 25.09.2010
here is a good streamer
http://forum.sa-mp.com/showthread.ph...gnito+streamer
Re: Need Help IconMap -
xinix000 - 25.09.2010
i read the streamer and very confuse can some one teach me step by step ??