Strcmp not working
#1

The problem is, im ID 0, i join, im fine. It says no difference, and ips are the same (127.0.0.1) and in the ini file too (127.0.0.1). Now my friend joins and it says DIFFERENCE FOUND, while the IP of my friend and the ip in the ini are exactly the same. And he gets banned. Please help me?

Код:
dcmd_actest(playerid, params[])
{
	new string[128];
  new Name[MAX_PLAYER_NAME+1];

  GetPlayerName(playerid, Name, sizeof(Name));
	GetPlayerIp(playerid, PlayerIP[playerid], sizeof(PlayerIP));

	if(!strcmp(Name, "Eros"))
	{
	  printf("Player IP: %s --- Original IP: %s", PlayerIP[playerid], dini_Get("Players.ini", "ErosIP"));

		if(strcmp(PlayerIP, dini_Get("Players.ini", "ErosIP")))
		{
			format(string, sizeof(string), "***BAN: %s (%d) (INVALID NICK) Fake Admin!", Name, playerid);
 			SendClientMessageToAll(COLOR_PINK, string);
		}
	}

	else if(!strcmp(Name, "Decysen"))
	{
	  printf("Player IP: %s --- Original IP: %s", PlayerIP[playerid], dini_Get("Players.ini", "DecysenIP"));
		
		if(strcmp(PlayerIP, dini_Get("Players.ini", "DecysenIP")))
		{
			format(string, sizeof(string), "***BAN: %s (%d) (INVALID NICK) Fake Admin!", Name, playerid);
 			SendClientMessageToAll(COLOR_PINK, string);
		}
	}
	
	return 1;
}
Reply


Messages In This Thread
Strcmp not working - by Robbin237 - 20.03.2009, 15:54
Re: Strcmp not working - by Robbin237 - 22.03.2009, 16:18
Re: Strcmp not working - by tom_jonez - 23.03.2009, 03:51
Re: Strcmp not working - by Pghpunkid - 23.03.2009, 05:38
Re: Strcmp not working - by Robbin237 - 28.04.2009, 12:04
Re: Strcmp not working - by MenaceX^ - 28.04.2009, 12:21
Re: Strcmp not working - by Djiango - 28.04.2009, 12:34

Forum Jump:


Users browsing this thread: 1 Guest(s)