[Ajuda] Ip dos players
#2

Quote:
Originally Posted by LuanGamer
View Post
Boa tarde, estou tentando fazer com que somente apareзa o ip para os admins superiores ao os players se conectarem, porйm o ip nгo aparece para ninguem, creio q seja algum erro no cуdigo.

Cуdigo original:
Code:
new IPDoCara[32];
	GetPlayerIp(playerid, IPDoCara, sizeof IPDoCara);
	format(string2, sizeof(string2), "AdmCmd: %s (IP: %s) conectou-se.", PlayerName(playerid),IPDoCara);
Novo cуdigo tentado:
PHP Code:
new IPDoCara[32];
    
GetPlayerIp(playeridIPDoCarasizeof IPDoCara);
    if (
PlayerInfo[playerid][pAdmin] >= 3000)
    {
    
format(string2sizeof(string2), "AdmCmd: %s (IP: %s) conectou-se."PlayerName(playerid),IPDoCara);
    }
    if(
PlayerInfo[playerid][pAdmin] < 3000)
    {
    
format(string2sizeof(string2), "AdmCmd: %s conectou-se."PlayerName(playerid));
    } 
Code:
Tenta colocar um else ou else if nessa parte:

new IPDoCara[32];
	GetPlayerIp(playerid, IPDoCara, sizeof IPDoCara);
    if (PlayerInfo[playerid][pAdmin] >= 3000)
    {
	format(string2, sizeof(string2), "AdmCmd: %s (IP: %s) conectou-se.", PlayerName(playerid),IPDoCara);
	}
	else if(PlayerInfo[playerid][pAdmin] < 3000)
	{
    format(string2, sizeof(string2), "AdmCmd: %s conectou-se.", PlayerName(playerid));
	}
Reply


Messages In This Thread
Ip dos players - by LuanGamer - 04.02.2017, 14:40
Re: Ip dos players - by Felipe1241421 - 04.02.2017, 15:00
Programando e Gambiarrando! - by RazorGuigo - 04.02.2017, 15:38
Respuesta: Ip dos players - by SammyJ - 04.02.2017, 16:23

Forum Jump:


Users browsing this thread: 1 Guest(s)