A problem
#1

Hi, I wanted to make the playermarkers for the npcs in my server invisible by doing this:
pawn Код:
forward ShowNPCMarker (playerid);
public ShowNPCMarker(playerid)
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if(IsPlayerNPC(playerid))
            {
                SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00 );
            }
        }
    }
}
But they are still visible on the minimap, please help me!
Reply
#2

I dont realy know whats wrong and if i use this in my script it just works?
Reply
#3

Quote:
Originally Posted by kanersps
Посмотреть сообщение
I dont realy know whats wrong and if i use this in my script it just works?
On the minimap the player marker icons are visible but I want them to be INvisible.
Reply
#4

Do you call the function anywhere?
Reply
#5

That's not the right way to make the markers invisible on the minimap.. instead of that add this:
PHP код:
forward ShowNPCMarker ();
public 
ShowNPCMarker()
{
    for(new 
i=0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i) && IsPlayerNPC(i))
        {
            
SetPlayerColor(iGetPlayerColor(i) - (GetPlayerColor(i) & 0x000000FF) - 255);
        }
    }

This is a snippet taken from 0Hide, gratz to Zh3r0 for his script : https://sampforum.blast.hk/showthread.php?tid=262414
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)