Being invisible on the radar
#1

I'm trying to make a command called /gzinvisible which makes the player invisible for everyone except the one who executes the command(playerid).

The one who executes the command should be made invisible on the screen and radar aswell.
I saw this now ->>- SetPlayerMarkerForPlayer
But, On that tutorial it just says about hiding the player's radar mark for a specified player. But, I would like to hide the radar mark for everyone.

Hope someone would help me,
Thanks.
Reply
#2

you mean you have markers on mini map and if he makes the command his marker on minimap will disappear
Reply
#3

Exactly.
Reply
#4

ok i have made this in 3 minutes,test it:
pawn Код:
if(strcmp(cmd, "/visible", true) == 0)
    {
        if(PlayerInfo[playerid][visible] == 0)
        {
                PlayerInfo[playerid][visible] = 1;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[i][disable] == 1) SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));
                        if(PlayerInfo[i][disable] == 0) SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
                    }
                }
        }
        if(PlayerInfo[playerid][visible] == 1)
        {
                PlayerInfo[playerid][visible] = 0;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
                    }
                }
        }
        return 1;
    }
    if(strcmp(cmd, "/disablemarkers", true) == 0)
    {
        if(PlayerInfo[playerid][disable] == 1)
        {
                PlayerInfo[playerid][disable] = 0;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[i][visible] == 1) SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(playerid));
                        if(PlayerInfo[i][visible] == 0) SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
                    }
                }
        }
        if(PlayerInfo[playerid][disable] == 0)
        {
                PlayerInfo[playerid][disable] = 1;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
                    }
                }
        }
        return 1;
    }
And add in player info...visible and disable...
Reply
#5

Umm bro.. can ya explain those two commands!.. Didnt get it.. Whats /invisible for and /desable markers for?.. If we could really understand that We would have done bro. Please explain.
Reply
#6

Can you please explain what you've done on that code? I understand nothing. What do you mean by /disable, and other things?
Reply
#7

I have made 2 commands for you,if the player does /visible other players can see him on minimap with a marker with same color as his color,and if he does /visible again others cant see him on minimap as a marker,and if you /disable all of the markers of the players will disappear for you,i mean others can see it if they got disable off but you cant,if you do /disable,all of the guys that have invisible == 1 will appear on your minimap,i made it select able,i mean player can toggle markers on map or see the markers on the minimap,i did the best commands for you
0xFFFFFF00 means invisible
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)