Minimap help
#1

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?
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Reply
#3

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

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.
Reply
#5

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
Reply
#6

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

Sure, no hurry
Reply
#8

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;
    }
}
Reply
#9

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)