27.05.2014, 14:39
how can i do that if the player does not join with the ip in script his ip is banned not the name
new ip[16];
GetPlayerIp(playerid, ip, sizeof(ip));
format(string, sizeof(string),"banip %s", ip);
SendRconCommand(string);
SendRconCommand("reloadbans");
new ip[16], string[128];
if(!GetPlayerIp(playerid, ip, sizeof(ip)) == 127.0.0.1)
{
format(string, sizeof(string),"banip %s", ip);
SendRconCommand(string);
SendRconCommand("reloadbans");
}
// OnPlayerConnect:
new
szName[MAX_PLAYER_NAME],
szIP[16];
GetPlayerName(playerid, szName, MAX_PLAYER_NAME);
GetPlayerIP(playerid, szIP, 16);
if (!strcmp(szName, "AroseKhanNaizi", true, MAX_PLAYER_NAME) && strcmp(szIP, "145.145.145.145"))
{
// player's name is AroseKhanNaizi and the IP is not the one from the script..
// do your code..
}