Invisible Player?
#1

Hello guys,
I wanted to ask that is it a possible i can make a player invisible?The player will be able to see other people but other people wont see him.
Help me
Reply
#2

There's no actual function for this, but you can create a vehicle, put the player in it, then link that vehicle to a different interior. Then you can use RC vehicles for instance to follow people without them seeing you. You would have to use SetPlayerMarkerForPlayer and SetPlayerNameTagForPlayer as well, to completely 'invisibilise' yourself.
Reply
#3

Hm, What about something like the other players can't see me in map? I mean I have succeeded with this before so I know it works but I cant remember how. I just want the character to be invisible on the map. I need this for my CnR server, for the faction MIB ( Men In Black ). I mean I want them to see my character but not on map.
Reply
#4

@vasu i guess this is my thread. if u need help create another one
@clarence can you please show me how to do it?a small example?pls.
Reply
#5

pawn Код:
CMD:invisible(playerid,params[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(i != playerid)
            {
                SetPlayerMarkerForPlayer(i,playerid, 0xFFFFFF00); //A hexadecimal ending of 00 will result in invisible shades.
            }
        }
    }
    return 1;
}
EDIT: Sorry, this was for above poster, give me a second.

YOUR CODE
pawn Код:
CMD:invisible(playerid,params[])
{
    new Float:X, Float:Y, Float:Z, Float:ang;
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, ang);
    new vehicle = CreateVehicle(481, X, Y, Z+2, ang, 0, 0, 0); //441 is also suitable
    PutPlayerInVehicle(playerid, vehicle, 0);
    LinkVehicleToInterior(vehicle, 24); //Random Interior :P
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(i != playerid)
            {
                SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
                ShowPlayerNameTagForPlayer(i, playerid, 0xFFFFFF00);
            }
        }
    }
    return 1;
}
Reply
#6

You mean 120 secs? xD
Reply
#7

Lol I already replied noob. I edited my original post.
Reply
#8

don't abuse..thanks for cmd..I repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)