[Ajuda] Anti-tag - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Anti-tag (
/showthread.php?tid=357653)
Anti-tag -
[XPG]MarlonCS - 07.07.2012
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?
Re: Anti-tag -
Gabriel Duarte - 07.07.2012
manda o anti tag completo...
Re: Anti-tag -
[XPG]MarlonCS - 07.07.2012
Quote:
Originally Posted by Gabriel Duarte
manda o anti tag completo...
|
Esse й o anti-tag completo.
AW: Anti-tag -
billy the kid - 07.07.2012
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!
Re: Anti-tag - rjjj - 07.07.2012
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

.