[Ajuda] #bannick off
#3

Tente esse
pawn Code:
COMMAND:banirnick(playerid, params[])
{
   new Nick, Motivo, mauricio[MAX_PLAYER_NAME], accfile[129], banfile[129];
   GetPlayerName(playerid, Nome,sizeof(Nome));
   GetPlayerName(Nick, mauricio,sizeof(mauricio));
   if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, ColorErro,"[Erro] Vocк Nгo e Um Administrador.");
   if(ADMTrabalhando[playerid] == 0) return SendClientMessage(playerid, ColorErro,"[Erro] Vocк Nгo esta Trabalhando.");
   if(sscanf(params,"is",Nick,Motivo)) return SendClientMessage(playerid, ColorErro,"CMD: /banirnick [Nick] [Motivo]");

   format(accfile,128,"Contas/%s.ini", mauricio);
   if(!DOF2_FileExists(accfile))
      return SendClientMessage(playerid,-1,"[Erro] Vocк nгo pode banir um nick nгo registrado.");
   new string[200];
   format(banfile,128,"Banidos/%s.ini", mauricio);
   if(DOF2_FileExists(banfile))
   {
      format(string, 128," 'TBan' O administrador %s baniu o nick %s || Motivo: %s", Nome, mauricio, Motivo);
      SendClientMessageToAll(0xFB0000FF,string);

      DOF2_CreateFile(banfile);
      DOF2_SetInt(accfile, "Banned", 1);

      new hour, minute, second, day, month, year;
      gettime(hour, minute, second);
      getdate(year, month, day);

      new str[52];
      format(str,52,"Admin:%s\nNick Banido: %s \nMotivo:%s\n Horas %02d/%02d аs %02d:%02d", Nome, mauricio, Motivo , day, month, hour, minute);
      DOF2_SetString(banfile, "InfoBan", str);
   }
   return true;
}
Reply


Messages In This Thread
#bannick off - by mau.tito - 25.09.2012, 14:32
Re: #bannick off - by ViniBorn - 25.09.2012, 14:35
Re: #bannick off - by MatheusAlcapone - 25.09.2012, 14:35
Re: #bannick off - by mau.tito - 25.09.2012, 14:41
Re: #bannick off - by MatheusAlcapone - 25.09.2012, 14:46
Re: #bannick off - by Don_Speed - 25.09.2012, 14:55
Re: #bannick off - by mau.tito - 25.09.2012, 15:07

Forum Jump:


Users browsing this thread: 5 Guest(s)