[Pedido] /mascarar
#1

Alguem tem ai? cmd /mascarar, q qnd ta usando isso ninguem pode ver o nome da pessoa q ta com o comando?
Reply
#2

topo do gm
pawn Код:
new mascarado[MAX_PLAYERS];
Na public de comandos
pawn Код:
if (strcmp("/mascarar", cmdtext, true) == 0)
{
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
    if(mascarado[playerid] == 1)
    {
       mascarado[playerid] = 0;
       ShowPlayerNameTagForPlayer(playerid, i, false);
       GameTextForPlayer(playerid, "~W~Nicks ativados", 5000, 5);
    }
    else
    {
       mascarado[playerid] = 1;
       ShowPlayerNameTagForPlayer(playerid, i, false);
       GameTextForPlayer(playerid, "~W~Nick desativados", 5000, 5);
    }
}
    return 1;
}
Reply
#3

A partir desse code agora vocк apenas faзa o resto, porque quando o player for usar comandos ou falar no chat irб aparecer o nick dele, agora й so vocк arrumar isto ;P.
Reply
#4

Pode por exemplo, fazer isto para fazer com que o nick do jogador nгo apareзa no chat:

pawn Код:
{
    if(mascarado[playerid])
    {
        new string[128];
        format(string, sizeof(string), "Um estranho diz: \"%s\"", text); //This is when you masked and you start to speake
        SendClientMessage(playerid, COLOR_WHITE, string); // This is message what send to player near you, you can change color if you want.
        return 0;
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by Twizted
Посмотреть сообщение
Pode por exemplo, fazer isto para fazer com que o nick do jogador nгo apareзa no chat:

pawn Код:
{
    if(mascarado[playerid])
    {
        new string[128];
        format(string, sizeof(string), "Um estranho diz: \"%s\"", text); //This is when you masked and you start to speake
        SendClientMessage(playerid, COLOR_WHITE, string); // This is message what send to player near you, you can change color if you want.
        return 0;
    }
    return 1;
}
Sim pode ser assim mesmo, mas claro lembre-se de colocar isso na public OnPlayerText.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)