IP wrong
#1

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?
Reply
#2

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)
Reply
#3

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
Reply
#4

How to give negative reputation?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)