03.10.2016, 14:23
Galera alguem conhece algum sistema de anti login rcon que somente o nome que tiver no sistemas pode logar na rcon os players que descobrirem a senha e tentar logar toma ban
public OnRconLoginAttempt(ip[], password[], success) { new IP[16], Nome[24]; for(new i = 0; i < MAX_PLAYERS; ++ i) { if(!IsPlayerConnected(i)) continue; GetPlayerIp(i, IP, 16); if(strcmp(IP, ip, true) == 0) { GetPlayerName(i, Nome, 24); if(!(strcmp(Nome, "NOME_PERMITIDO", true) == 0)) { BanEx(i, "Rcon Login"); } break; } } return 1; }
public OnRconLoginAttempt(ip[], password[], success) { new pIP[20], uName[MAX_PLAYER_NAME]; if(success) { for(new i; i < GetMaxPlayers(); i++) { GetPlayerIp(i, pIP, sizeof(pIP)); if(strcmp(pIP, ip, true) != 0) continue; GetPlayerName(i, uName, sizeof(uName)); if(!strcmp(uName, "Nick1", true) || !strcmp(uName, "Nick2", true) || !strcmp(uName, "Nick3", true) || !strcmp(uName, "Nick4", true)) // Nicks Rcon { SendClientMessage(i, COR_GREEN, "[RCON - INFO] Vocк estб autorizado a logar na RCON."); } else { SendClientMessage(i, COR_ERRO, "[RCON - INFO] {CD0000}Vocк nгo estб autorizado a logar na RCON."); Kick(i); } break; } }
static Permission[] =
{
"Glederson_Dom",
"Dom",
"Fulano"
};
public OnRconLoginAttempt(ip[], password[], success)
{
static
pIP[20], pName[MAX_PLAYER_NAME];
if(success)
{
for(new i; i < GetMaxPlayers(); i++)
{
GetPlayerIp(i, pIP, sizeof(pIP));
if(strcmp(pIP, ip, true) != 0) continue;
GetPlayerName(i, pName, sizeof(pName));
for(new p=0; p < sizeof(Permission); ++p){
if(strcmp(pName, Permission[p], false))
{
SendClientMessage(i, COR_GREEN, "Vocк nгo estб autorizado a logar na RCON");
Kick(i);
}
}
}
}
}
public OnRconLoginAttempt(ip[], password[], success)
{
new Nome[24];
for(new i = 0; i < MAX_PLAYERS; ++ i){
GetPlayerName(i, Nome, 24);
if(strfind(Nome(i),"Pedro_Eduardo",true)){
return 1;
}else{
Kick(i);
}
}
return 1;
}
stock Nome(playerid)
{
new pNome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pNome, 24);
return pNome;
}