SA-MP Forums Archive
Help one mapicon - 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)
+--- Thread: Help one mapicon (/showthread.php?tid=288354)



Help one mapicon - Link_ - 07.10.2011

Anyone know how to put only one of the houses icon to appear on the map?
Look at the code I tried to do but are not showing up
pawn Code:
forward MapIconStreamer();
public MapIconStreamer()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:SmallestDistance = 99999.9;
            new CP, Float:OldDistance;
            for(new propid; propid<MAX_HOUSES; propid++)
            {
                OldDistance = GetDistanceToProperty(i, propid);
                if(OldDistance < SmallestDistance)
                {
                    SmallestDistance = OldDistance;
                    CP = propid;
                }
            }
RemovePlayerMapIcon(i, 31);
            if(hInfo[CP][TemDono] == 1)
            {
                SetPlayerMapIcon(i, 31, hInfo[ CP ][ iconx ],hInfo[ CP ][ icony ],hInfo[ CP ][ iconz ], 32, 0);
            }
            else
            {
                SetPlayerMapIcon(i, 31, hInfo[ CP ][ iconx ],hInfo[ CP ][ icony ],hInfo[ CP ][ iconz ], 31, 0);
            }
        }
    }
}



Re: Help one mapicon - Salsa - 07.10.2011

Me to try but Map icons not showing


Re: Help one mapicon - Link_ - 07.10.2011

I did not understand already used most dynamic mapicon flashes