[HELP] How to....
#1

Hello.

I would like to ask about How do I make a player's visibility on radar to be invisible after they selected a choice via Dialog?

If you help,thanks.I would really appreciate your help.

Sincerely,
Huxley.
Reply
#2

well i dont know very much but its something regarding :
pawn Код:
ShowPlayerMarkers(0);
to disable
Reply
#3

Here ya go..
So you can set the color first then place this snippet right after..
Though i remember there was another way..but it should work in the way you need it too..
pawn Код:
SetPlayerColor(playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));//invisible marker and keep the player's color at the same time
And im assuming in the dialog they are choosing their color? Or what..
Reply
#4

Just add one line under "OnGameModeInit()"
To enable = ShowPlayerMarkers(1);
To disable = ShowPlayerMarkers(0);

--- Same goes to the name tags, if you want to disable/enable them. ---
To enable = ShowNameTags(1);
To disable = ShowNameTags(0);
Reply
#5

Here is the code originally from my own server

pawn Код:
CMD:marker(playerid, params[])
{
    ShowPlayerDialog(playerid,1240,DIALOG_STYLE_LIST,"Map Markers","Show Marker\nHide Marker","Ok", "Cancel");
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 1240:
        {
            if(!response)
            {
            SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
            return 1;
            }

            switch(listitem)
            {
                case 0:
                {
                    for(new i=0; i<MAX_PLAYERS; i++) SetPlayerMarkerForPlayer( i, playerid, GetPlayerColor( playerid ) ); //from wiki
                    return SendClientMessage(playerid, 0x80FF00AA, "Your marker is now seeable for everyone.");
                }
                case 1:
                {
                    for(new i=0; i<MAX_PLAYERS; i++) SetPlayerMarkerForPlayer( i, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) ); //from wiki
                    return SendClientMessage(playerid, 0x80FF00AA, "Your marker is now invisible for everyone.");
                }
            }
        }
    }
    return 1;
}
I think this will help this code was made by Jeffry he made me that code but without dialog i converted into dialog for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)