SA-MP Forums Archive
IP wrong - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IP wrong (/showthread.php?tid=664485)



IP wrong - Lixyde - 02.03.2019

So the problem is that i maded so when you spawn its gonna show your name, admin, kills, and etc..
and show your ip.

But there is the problem, the ip.

Look at the code:

Код:
new admin = PlayerInfo[playerid][pAdmin];
	new kills = PlayerInfo[playerid][pKills];
	
	new playername[MAX_PLAYER_NAME];
	new pIP[16];
	new string[1200];
	GetPlayerName(playerid, playername, sizeof(playername));
	GetPlayerIp(playerid, pIP, sizeof(pIP));
	format(string, sizeof(string), "{FFFFFF}Your Name: {00FF28}%s\n{FFFFFF}IP: {00FF28}%s\n{FFFFFF}Money: {00FF28}%i\n{FFFFFF}Admin: {00FF28}%i\n{FFFFFF}Kills: {00FF28}%i", playername, pIP, GetPlayerMoney(playerid), admin, kills);
    SendClientMessage(playerid, WDOG_COLOR, string);
And in game it doesnt show the real ip, it just shows 127.0.0.1.

How to fix it? And what causes the problem?


Re: IP wrong - Longover - 02.03.2019

Quote:
Originally Posted by Lixyde
Посмотреть сообщение
So the problem is that i maded so when you spawn its gonna show your name, admin, kills, and etc..
and show your ip.

But there is the problem, the ip.

Look at the code:

Код:
new admin = PlayerInfo[playerid][pAdmin];
	new kills = PlayerInfo[playerid][pKills];
	
	new playername[MAX_PLAYER_NAME];
	new pIP[16];
	new string[1200];
	GetPlayerName(playerid, playername, sizeof(playername));
	GetPlayerIp(playerid, pIP, sizeof(pIP));
	format(string, sizeof(string), "{FFFFFF}Your Name: {00FF28}%s\n{FFFFFF}IP: {00FF28}%s\n{FFFFFF}Money: {00FF28}%i\n{FFFFFF}Admin: {00FF28}%i\n{FFFFFF}Kills: {00FF28}%i", playername, pIP, GetPlayerMoney(playerid), admin, kills);
    SendClientMessage(playerid, WDOG_COLOR, string);
And in game it doesnt show the real ip, it just shows 127.0.0.1.

How to fix it? And what causes the problem?
Because you are in localhost. (I will be happy if you will give me a REP+ for solution)


Re: IP wrong - thefirestate - 02.03.2019

Quote:
Originally Posted by ******
Посмотреть сообщение
Would you really? That may be true, but don't beg for rep. Take this post as a lesson:

https://sampforum.blast.hk/showthread.php?tid=416191
I have to say, that thread really made me laugh, poor guy, -107 rep, amazing


Re: IP wrong - TheToretto - 02.03.2019

How to give negative reputation?