SA-MP Forums Archive
Minimap help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Minimap help (/showthread.php?tid=229901)



Need help! :/ - Randomai - 22.02.2011

Hello.Making zombie server.i want that zombies can see humans in minimap, but humans cant see zombies in minimap.
Any ideas, how to do it?


Re: Minimap help - maramizo - 22.02.2011

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


Re: Minimap help - Randomai - 22.02.2011

i cant use that, i must put like 1000 times SetPlayrMarkerForPlayer.


Re: Minimap help - maramizo - 22.02.2011

Lol? Sigh...
Tell me, how do you define a player being a zombie? What's the variable that should be something like
IsPlayerZombie[playerid] = 1 or something, tell me that and I'll make it for you.


Re: Minimap help - Randomai - 22.02.2011

Well im newbie so dont get mad to me :P

Here is define:

Код:
#define TEAM_ZOMBIE 1
this is how i define it, i guess..

Код:
if(PlayerTeam[playerid] == 1)
1 = zombie team
0 = human team


Re: Minimap help - maramizo - 22.02.2011

Okay wait a few minutes I'm kind of making another script.


Re: Minimap help - Randomai - 22.02.2011

Sure, no hurry


Re: Minimap help - maramizo - 22.02.2011

Tell me if it works, I used zcmd include.
pawn Код:
CMD:mapvision(playerid, params[])
{
    new mapvisionz;
    if(PlayerTeam[playerid] == 1 && mapvisionz == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        if(PlayerTeam[i] != 1 && IsPlayerConnected(i))
        {
            SetPlayerMarkerForPlayer(playerid, i, 0xFF0000FF);
            SendClientMessage(playerid, 0xFFFFFFF, "You can now smell humans on your minimap.. Sniff Sniff.");
            LimitPlayerMarkerRadius(1000.0);
            mapvisionz = 1;
            return 1;
        }
    }
    else if(mapvisionz == 1)
    {
            LimitPlayerMarkerRadius(1.0);
            SendClientMessage(playerid, 0xFFFFFFF, "You can't smell anymore, something stuck in your nose?");
            mapvisionz = 0;
            return 1;
    }
}



Re: Minimap help - Randomai - 22.02.2011

aah, i dont use CMD, i dont even know where i should put it


Re: Minimap help - marinov - 23.02.2011

Quote:
Originally Posted by maramizo
Посмотреть сообщение
Tell me if it works, I used zcmd include.
pawn Код:
CMD:mapvision(playerid, params[])
{
    new mapvisionz;
    if(PlayerTeam[playerid] == 1 && mapvisionz == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        if(PlayerTeam[i] != 1 && IsPlayerConnected(i))
        {
            SetPlayerMarkerForPlayer(playerid, i, 0xFF0000FF);
            SendClientMessage(playerid, 0xFFFFFFF, "You can now smell humans on your minimap.. Sniff Sniff.");
            LimitPlayerMarkerRadius(1000.0);
            mapvisionz = 1;
            return 1;
        }
    }
    else if(mapvisionz == 1)
    {
            LimitPlayerMarkerRadius(1.0);
            SendClientMessage(playerid, 0xFFFFFFF, "You can't smell anymore, something stuck in your nose?");
            mapvisionz = 0;
            return 1;
    }
}
I took a fast look at that and kinda looks like that will show YOUR map icon for the others o.O

I would do something like :

pawn Код:
SetPlayerColor(playerid, 0xFFFFFFF);

EDIT: took a better look at it and nvm lol