[DUV] Ban Account
#1

Alguem poderia me ajudar ..

tipo , eu queria mudar o estilo do ban invez se so ban o ip

quiria q banisse a conta tbm..
+ eu nгo sei por onde comessa...
alguem ajuda e ?
Reply
#2

Usa DINI
Reply
#3

tipo eu nгo sei por onde comessa...

nao sei q funзгo usar nem nada...
Reply
#4

Tenta Algo Assim..

Topo GM
pawn Code:
new NomesBanidos[][MAX_PLAYER_NAME] =
{
  "DraKoN",
  "Andmeida",
  "Fedido"//LEMBRE-SE no ULTIMO NUNCA VAI "," VIRGULA
};
Agora:
pawn Code:
public OnPlayerConnect(playerid)
{
  new Name[MAX_PLAYER_NAME];
  GetPlayerName(playerid,name,sizeof(Name));
  for(new i; i<sizeof(NomesBanidos); i++)
  {
    if(strcmp(NomesBanidos[i],Name,true)==0)
    {
      Ban(playerid);
    }
  }
  return 1;
}
Reply
#5

DraKoN assim teria q editar o Gm a cada vez q bani-se alguem.
Se vocк usar DUDB pra criar a conta poderб fazer assim:

Comando ban...
dUserSetINT(NomeDoPlayer).("NickBan",(1));
Ban(id);
Nome do player pode usar: PlayerName.

------------------------------------------
E no OnPlayerConnect() {
if((dUserINT(NomeDoPlayer).("NickBan"))==1) {SendClientMessage(playerid,COR,"Seu nick estб banido!");Kick(playerid);}
Reply
#6

[b]Hum, Entendi Errado Mesmo Assim Vou Lhe mostrar Algo Facil que Fiz agora que ira lhe ajudar!!
Bom, Entгo Vou a Um Breve TUT:
Em OnGameModeInit:
pawn Code:
if(!fexist("nbans.ini")) dini_Create("nbans.ini");
Agora o Comando:
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], idx;
    cmd = strtok(cmdtext, idx);
 
    if(strcmp(cmd, "/nBan", true) == 0)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
 
        if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /nban [ID-Do-Jogador]");
 
        Kick(strval(tmp));
dini_IntSet("nbans.ini",PlayerName(strval(tmp)),GetPlayerLevel(strval(tmp)));//Aqui nгo Sabia o que Colocar
        return 1;
    }
    return 0;
}
Agora em
OnPlayerConnect:

pawn Code:
if(dini_Isset("nbans.ini",PlayerName((strval(tmp))) Kick(playerid,dini_Int("nbans.ini",PlayerName((strval(tmp)));

Final GM
pawn Code:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
 
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Nгo Tenho Certeza Mais й Algo por Ai...




Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)