SA-MP Forums Archive
SetPlayerMarkerForPlayer bugs up - 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: SetPlayerMarkerForPlayer bugs up (/showthread.php?tid=386523)



SetPlayerMarkerForPlayer bugs up - EV007 - 20.10.2012

pawn Код:
if(GetTeam(i) != 2)
            {
                ForEach(a,MAX_SLOTS)
                {
                    if(PlayerI[i][Team] == PlayerI[a][Team])
                    {
                        if(PlayerI[a][UsedSpotted] == 0)
                        {
                            SetPlayerMarkerForPlayer( i, a,  GetPlayerColor( a ) );
                        }
                        else
                        {
                            SetPlayerMarkerForPlayer( i, a,  0xFF0000FF );
                        }
                    }
                    else
                    {
                        SetPlayerMarkerForPlayer( i, a, ( GetPlayerColor( a ) & 0xFFFFFF00 ) );
                    }
                }
            }
the code should make team A invisible on radar for team B, same with team B to team A. Ok, it works fine when I do this, but when player A keeps getting closer to player B it shows the marker for some milisecs when he gets close enough (i.e 500meters) though, it makes it invisible after again and works fine, is there any way to fix that little appear and disappear?


Re: SetPlayerMarkerForPlayer bugs up - EV007 - 22.10.2012

help..


Re: SetPlayerMarkerForPlayer bugs up - WizBoy - 22.10.2012

Can u give us more of the script cuz' IDK what is you ''i'' , ''a'' , ''b'' and this other shit


Re: SetPlayerMarkerForPlayer bugs up - EV007 - 22.10.2012

whats there more to know, take the code, re-write it regarding to your script and test out with 2people,whenever you keep getting closer from 1000 meters it shows the marker in the radar. Code isn't the problem here. As I see you're raw on this in any way, so stop free posting.


Re: SetPlayerMarkerForPlayer bugs up - denNorske - 22.10.2012

I saw your code, and i noticed you didnt try this:

https://sampwiki.blast.hk/wiki/LimitPlayerMarkerRadius

You could limit the marker radius manually on each team, and set it to minimum to make it invisible for the other team.
If it helped, yea, i would like the 7th rep xD


Re: SetPlayerMarkerForPlayer bugs up - EV007 - 22.10.2012

The function doesn't work, I've set it to 1.0, and it still shows it even if I don't make the markers invisible yet


Re: SetPlayerMarkerForPlayer bugs up - denNorske - 22.10.2012

Hmm, could i have a look what you tried?
The function should work, because it does for me, hmm..


Re: SetPlayerMarkerForPlayer bugs up - EV007 - 22.10.2012

pawn Код:
LimitPlayerMarkerRadius(1.0);
I've put this ongamemodeinit in a fresh new script, and it doesn't do anything.


Re: SetPlayerMarkerForPlayer bugs up - denNorske - 22.10.2012

Okay, try another value. I am using 100.0 As my default, so maybe it works for you too ?


Re: SetPlayerMarkerForPlayer bugs up - EV007 - 23.10.2012

Doesn't work.