Need Help IconMap
#1

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 ??
Reply
#2

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 );
        }
    }
}
Reply
#3

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.
Reply
#4

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.
Reply
#5

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.
Reply
#6

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 ??
Reply
#7

here is a good streamer

http://forum.sa-mp.com/showthread.ph...gnito+streamer
Reply
#8

i read the streamer and very confuse can some one teach me step by step ??
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)