18/12/2021 17:06
boa tarde. eu to banindo um player e mesmo assim ele volta no servidor só trocando o nick e COM O MESMO IP.
CMD: BAN
VERIFICAÇÃO NO ONPLAYERCONNECT(ACHO QUE O PROBLEMA ESTA AI)
CMD: BAN
Código PHP:
CMD:ban(playerid, params[])
{
new
Dia,
Mes,
Ano,
Hora,
Minuto,
Segundo,
sStr[22],
sStr3[22],
sStr2[128],
IP[128],
adminName[MAX_PLAYER_NAME];
if(playerid == INVALID_PLAYER_ID)
{
format(adminName, 16, "SERVIDOR_DETECT");
sscanf(params, "us[400]", iddele, sStr2);
goto go;
}
format(adminName, MAX_PLAYER_NAME, Nome(playerid));
if(ChecarPermissoes(playerid)) return 1;
if(AdmServer(playerid, 2)) return 1;
if(sscanf(params, "us[400]", iddele, sStr2))
return Msg(playerid, COLOR_YELLOW, "<!> {FFFFFF}Use: /Ban <id> <Motivo>");
if(!IsPlayerConnected(iddele))
return SendClientMessage(playerid, COLOR_RED, "<!> {FFFFFF}Esse jogador não está conectado!");
go:
getdate(Ano, Mes, Dia);
gettime(Hora, Minuto, Segundo);
GetPlayerIp(iddele, IP, sizeof IP);
format(String,128, "<!> {FF4444}O administrador %s Baniu [%s] [Motivo: %s]", adminName, Nome(iddele), sStr2);
MsgToAll(COLOR_YELLOW,String);
format(sStr3, 14, "%d/%d/%d", Dia, Mes, Ano);
format(sStr, 22, "%d:%d:%d", Hora, Minuto, Segundo);
format(String, 50, "zP/ContasBanidas/%s.ini", Nome(iddele));
DOF2_CreateFile(String);
DOF2_SetString(String, "Admin", adminName);
DOF2_SetString(String, "Data", sStr3);
DOF2_SetString(String, "Hora", sStr);
DOF2_SetString(String, "Motivo",sStr2);
DOF2_SaveFile();
format(String, 50, "zP/IPsBanidos/%s.ini", IP);
DOF2_CreateFile(String);
DOF2_SetString(String, "Admin", adminName);
DOF2_SetString(String, "Data", sStr3);
DOF2_SetString(String, "Hora", sStr);
DOF2_SetString(String, "Motivo",sStr2);
DOF2_SaveFile();
//DOF2_SetInt(Arquivo(playerid), "Score", GetPlayerScore(playerid));
DOF2_SaveFile();
format(String,128, "<!> {FF4444}O administrador %s Baniu [%s] [Motivo: %s]", adminName, Nome(iddele), sStr2);
WriteLog(caminhoLog(2), String);
Kick(iddele);
return 1;
}
VERIFICAÇÃO NO ONPLAYERCONNECT(ACHO QUE O PROBLEMA ESTA AI)
Código PHP:
new Adm[21],
MotivoBan[100],
DataBan[20],
HoraBan[22];
format(String, sizeof(String), "zP/ContasBanidas/%s.ini", Nome(playerid));
if(DOF2_FileExists(String))
{
format(Adm, sizeof(Adm), DOF2_GetString(String, "Admin"));
format(MotivoBan, sizeof(MotivoBan), DOF2_GetString(String, "Motivo"));
format(DataBan, sizeof(DataBan), DOF2_GetString(String, "Data"));
format(HoraBan, sizeof(HoraBan), DOF2_GetString(String, "Hora"));
format(String, sizeof(String), "Olá %s, Você foi banido\n\n\t"AMARELO2"Admin: "BRANCO2"%s\n\t"AMARELO2"Motivo: "BRANCO2"%s\n\t"AMARELO2"Data: "BRANCO2"%s\n\t"AMARELO2"Hora: "BRANCO2"%s", Nome(playerid), Adm, MotivoBan, DataBan, HoraBan);
ShowPlayerDialog(playerid, DBanido, DIALOG_STYLE_MSGBOX, "{FFFFFF}BANIDO", String, "Sair","");
SetPlayerFacingAngle(playerid, 271.9657);
zPKick(playerid);
return 1;
}
GetPlayerIp(playerid, IP, sizeof IP);
format(String, sizeof(String), "zP/IPsBanidos/%s.ini", IP);
if(DOF2_FileExists(String))
{
format(Adm, sizeof(Adm), DOF2_GetString(String, "Admin"));
format(MotivoBan, sizeof(MotivoBan), DOF2_GetString(String, "Motivo"));
format(DataBan, sizeof(DataBan), DOF2_GetString(String, "Data"));
format(HoraBan, sizeof(HoraBan), DOF2_GetString(String, "Hora"));
format(String, sizeof(String), "Olá %s, Você foi banido\n\n\t"AMARELO2"Admin: "BRANCO2"%s\n\t"AMARELO2"Motivo: "BRANCO2"%s\n\t"AMARELO2"Data: "BRANCO2"%s\n\t"AMARELO2"Hora: "BRANCO2"%s", Nome(playerid), Adm, MotivoBan, DataBan, HoraBan);
ShowPlayerDialog(playerid, DBanido, DIALOG_STYLE_MSGBOX, "{FFFFFF}BANIDO", String, "Sair","");
SetPlayerFacingAngle(playerid, 271.9657);
BanEx(playerid, "IP Banido");
return 1;
}