SA-MP Forums Archive
Serious Problem with SetPlayerMarkerForPlayer - 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: Serious Problem with SetPlayerMarkerForPlayer (/showthread.php?tid=529592)



Serious Problem with SetPlayerMarkerForPlayer - SuperChock - 03.08.2014

Hello,

I have a function to set the blip player who calls a service.

First I created this:

pawn Код:
case 0: // Taxi
{
    foreach(Player, PLAY)
    {
        if(pL[PLAY][pLProf] == 2)
        {
            SendClientMessage(PLAY, 0x00FFFFFF, "A player called the taxi. See it on the radar...");
            PlayerPlaySoundEx(PLAY, 1057);
            SetPlayerMarkerForPlayer(PLAY, playerid, 0x00FFFFFF);
        }
    }
    SendClientMessage(playerid, 0x00FFFFFF, "You called a taxi. Please wait...");
    PlayerPlaySoundEx(playerid, 1056);
    SetPVarInt(playerid,  "Servic1", 1);
}
BUT, the SetPlayerMarkerForPlayer bug... after one of the players to move the blip disappears!

I have no other code related to the blips that might be causing it.

My SetPlayerMarkers is 1 (global) and I set the alpha of the all players to 00.

Looking for a way to solve this, I created this code:

pawn Код:
task ServerBlipAtualization[2000]()
{
    foreach(Player, PLAY)
    {
        if(GetPVarInt(PLAY, "Servic1") >= 1) // Taxista
        {
            foreach(Player, pLAY)
            {
                 if(pL[pLAY][pLProf] == 2) SetPlayerMarkerForPlayer(pLAY, PLAY, 0xFFFF00FF);
            }
        }
    }
}
But that did not solve my problem. Testing on localhost seems to work, but when the server has 5, 8, 12 players, the bug back.


Help me please!


Re: Serious Problem with SetPlayerMarkerForPlayer - BlackM - 03.08.2014

Quote:
Originally Posted by SuperChock
Посмотреть сообщение
after one of the players to move the blip disappears!
Sorry I really dont get what you mean here. Do you mean that when the Taxi player starts heading to the checkpoint it disappears? Cause judging from the code I think there is a tendancy of Checkpoint replacement to happen and thats your problem I guess. Maybe both? :P
Quote:
Originally Posted by SuperChock
Посмотреть сообщение
My SetPlayerMarkers is 1 (global) and I set the alpha of the all players to 00.
Alpha 00 means invisible. Alpha FF means fully visible. The color in your checkpoint code is Alpha FF (fully visible). Maybe you are referring to SetPlayerColor() function you probably placed in OnPlayerSpawn?


Re: Serious Problem with SetPlayerMarkerForPlayer - SuperChock - 03.08.2014

Quote:
Originally Posted by BlackM
Посмотреть сообщение
Sorry I really dont get what you mean here. Do you mean that when the Taxi player starts heading to the checkpoint it disappears? Cause judging from the code I think there is a tendancy of Checkpoint replacement to happen and thats your problem I guess. Maybe both? :P
Yes! That's exactly what happens ... when the taxi goes to the player, the blip disappears!

Quote:
Originally Posted by BlackM
Посмотреть сообщение
Alpha 00 means invisible. Alpha FF means fully visible. The color in your checkpoint code is Alpha FF (fully visible). Maybe you are referring to SetPlayerColor() function you probably placed in OnPlayerSpawn?
In my OnPlayerConnect I was defined SetPlayerColor with alpha 00. Now I'll try to use alpha FF and my OnPlayerSpawn use SetPlayerMarkerForPlayer for all players with alpha 00.


Re: Serious Problem with SetPlayerMarkerForPlayer - SuperChock - 04.08.2014

up!


Re: Serious Problem with SetPlayerMarkerForPlayer - Threshold - 04.08.2014

Do you have LimitPlayerMarkerRadius anywhere in your code?


Re: Serious Problem with SetPlayerMarkerForPlayer - SuperChock - 04.08.2014

No!