17.10.2010, 21:24
Bom, resolvi fazer um sistema de quando o player entrar no server ... checa se tem a tag(clan) de admin no nome, se tiver retira-o, ficando assim (OnPlayerConnect
Entгo, compilou normal, ai entгo fui testб-lo com o nick [BP]BiieL (BP: admin clan) ...
Aн detectou, sу que na hora de retirar o [BP] (strdel) ele transformou o nick em: "er"
Aн queria saber se alguem consegue me dizer como resolve-lo ...
Usei o search pois atй lembro q o Drakon postou algo assim, mas nгo estou achando-o ...
Se achar eu informo ...
Obrigado
pawn Код:
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
new Pip[128];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerIp(playerid, Pip, sizeof(Pip));
if(strcmp(Pip, "192.168.1.100"))//isso eh pq to tendo q usar o samp_debug
{
SetPlayerName(playerid, "[BP]BiieL");
}
if(strfind("[BP]", pname))
{
strdel(pname, 0, 4);
SetPlayerName(playerid, pname);
new bla[128];
format(bla, 128, "You aren't a admin, so the Auto-Admin changed your name to: %s", pname);
SendClientMessage(playerid, VERMELHO, bla);
}
format(string, sizeof(string), "%s has joined the Base Jumping Server", pname);
SendClientMessageToAll(AZUL, string);
SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
//daqui pra frente й sу do registro
Aн detectou, sу que na hora de retirar o [BP] (strdel) ele transformou o nick em: "er"
Aн queria saber se alguem consegue me dizer como resolve-lo ...
Usei o search pois atй lembro q o Drakon postou algo assim, mas nгo estou achando-o ...
Se achar eu informo ...
Obrigado