23.04.2012, 06:44
(
Последний раз редактировалось .ThePro; 23.04.2012 в 06:46.
Причина: errei o comando
)
quando do ban no cara por ip ele rologa com outra conta e consegue entrar no server ;s
On Player Connect
COMANDOS DE BANIR
On Player Connect
Код:
format(Celula, sizeof(Celula), "JFSAdmin/IpsBanido/%s.ini", PlayerName(playerid)); if(dini_Exists(Celula)) { new PlayerBanido[24], PlayerMotivo[128], PegarIP[24]; format(PlayerBanido, sizeof(PlayerBanido), "%s", dini_Get(Celula, "AdministradorDoIP")); format(PlayerMotivo, sizeof(PlayerMotivo), "%s", dini_Get(Celula, "MotivoDoIP")); new PlayerDia = dini_Int(Celula, "DiaDoIP"); new PlayerMes = dini_Int(Celula, "MкsDoIP"); new PlayerAno = dini_Int(Celula, "AnoDoIP"); new PlayerHora = dini_Int(Celula, "HoraDoIP"); new PlayerMinuto = dini_Int(Celula, "MinutoDoIP"); GetPlayerIp(id,PegarIP,128); new DialogBan[400]; format(Celulas, sizeof(Celulas), "{FF5500}Seu IP: {33CCFF}%s\n", PegarIP); strcat(DialogBan, Celulas); format(Celulas, sizeof(Celulas), "{FF5500}Administrador Que Lhe Baniu: {33CCFF}%s\n\n", PlayerBanido); strcat(DialogBan, Celulas); format(Celulas, sizeof(Celulas), "{FF5500}Motivo do Banimento: {33CCFF}%s\n", PlayerMotivo); strcat(DialogBan, Celulas); format(Celulas, sizeof(Celulas), "{FF5500}Data do Banimento: Dia: {33CCFF}%d {FF5500}Mкs: {33CCFF}%d {FF5500}Ano: {33CCFF}%d {FF5500}Hora: {33CCFF}%d {FF5500}Minuto: {33CCFF}%d.", PlayerDia, PlayerMes, PlayerAno, PlayerHora, PlayerMinuto); strcat(DialogBan, Celulas); ShowPlayerDialog(playerid, 8878, DIALOG_STYLE_MSGBOX, "{00F6F6}BANIDO ! Informaзхes Abaixo.", DialogBan, "Fechar", ""); Kick(playerid); return true; }
Код:
COMMAND:banirip(playerid, params[]) { new PegarIP[16]; if(PlayerInfo[playerid][Administrador] < 4) return SendClientMessage(playerid, AMARELO_ESCURO, "Vocк Nгo й Administrador."); if(PlayerInfo[playerid][Trabalhando] != 1) return SendClientMessage(playerid, AMARELO_ESCURO, "Vocк Nгo Estб Trabalhando. ( /trabalhar )"); if(sscanf(params, "us[128]", id, Texto)) return SendClientMessage(playerid, AMARELO_ESCURO, "Use: /banirip [ID] [Motivo]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, AMARELO_ESCURO, "Jogador nгo conectado!"); GetPlayerName(playerid, Jogador, 23); GetPlayerName(id, Outro, 23); GetPlayerIp(id,PegarIP,128); format(Celula, sizeof(Celula), "O Admin %s Baniu o Jogador %s Pelo IP {33FF00}[ Motivo: %s ].", Jogador, Outro, Texto); SendClientMessageToAll(-1, Celula); getdate(Ano, Mes, Dia); gettime(Hora, Minuto, Segundo); format(Celula, sizeof(Celula), "[%s] - %s Baniu o IP Do Player %s Motivo %d (%d/%d/%d - %d:%d:%d)",PegarIP, Jogador,Outro, Texto, Dia, Mes, Ano, Hora, Minuto, Segundo); BanIP(Celula); format(Celula, sizeof(Celula), "JFSAdmin/IpsBanido/%s.ini", Outro); if(!fexist(Celula)) { dini_Create(Celula); dini_Set(Celula,"IPDoBan", PegarIP); dini_Set(Celula,"AdministradorDoIP", Jogador); dini_Set(Celula, "MotivoDoIP", Texto); dini_IntSet(Celula, "DiaDoIP", Dia); dini_IntSet(Celula, "MкsDoIP", Mes); dini_IntSet(Celula, "AnoDoIP", Ano); dini_IntSet(Celula, "HoraDoIP", Hora); dini_IntSet(Celula, "MinutoDoIP", Minuto); } Kick(id); return true; }