[Ajuda] Anti-tag
#1

Eu peguei esse anti-tag aqui no fуrum, porйm, ele sу retira a tag que estб no comeзo do nome.

Код:
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof name);
    new
    startpos = strfind(name, "[", true),
    endpos = strfind(name, "]", true);
    if(startpos != -1 && endpos != -1)
    {
    strdel(name, startpos, endpos + 1);
    if(name[0])
    {
    SetPlayerName(playerid, name);
    format(string, sizeof(string), "[SERVER] Seu Nick Foi mudado para '%s'. Nгo й permitido tags.", name);
    SendClientMessage(playerid,0xFF0000FF,string);
    }
    }
Й possнvel por para retirar a tag de qualquer parte do nome?
Reply
#2

manda o anti tag completo...
Reply
#3

Quote:
Originally Posted by Gabriel Duarte
Посмотреть сообщение
manda o anti tag completo...
Esse й o anti-tag completo.
Reply
#4

use o search nao vou falar aonde tah por q eu nao vou procura e te da de mao beijada procure pesquise so te falo tem um codigo igual a esse ae em CODIGOS UTEIS!
Reply
#5

Isto deve resolver o seu problema :


pawn Код:
new Nome[25], Inicio, Fim;
    GetPlayerName(playerid, Nome, 25);
    while((Inicio = strfind(Nome, "[")) != -1 && (Fim = strfind(Nome, "]")) != -1)
    {
        strdel(Nome, Inicio, Fim + 1);
    }
    if(Nome[0])
    {
        SetPlayerName(playerid, Nome);
        new STR[85];
        format(STR, 85, "[SERVER] Seu Nick Foi mudado para '%s'. Nгo й permitido tags.", Nome);
        SendClientMessage(playerid, 0xFF0000FF, STR);
    }


Espero ter ajudado .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)