12.09.2012, 10:05
How can i scripting, that, Admins can see the IP of a Player? So when he type the Tab list, and click of a Player, so that Admins can see the IP?
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(!IsPlayerAdmin(playerid) || AdminVariable[playerid] < 1) return 0;
new IPSTRING[20], PlayersName[MAX_PLAYER_NAME];
GetPlayerName(clickedplayerid, PlayersName, MAX_PLAYER_NAME);
GetPlayerIp(clickedplayerid, IPSTRING, sizeof(IPSTRING));
new string[50];
format(string,sizeof(string),"%s | IP: %s",PlayersName, IPSTRING);
SendClientMessage(playerid, 0xFFFF00FF, string);
return 1;
}
public OnPlayerClickPlayer( playerid, clickedplayerid, source )
{
new String[ 15 ];
GetPlayerIp(clickedplayerid, String, 15);
SendClientMessage(playerid, -1, String);
return ( 1 );
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "You are not allowed to do that");
new PlayerIP[16], string[20], id;
GetPlayerIp(id, PlayerIP, sizeof(PlayerIP));
format(string, sizeof(string), "Player IP is:%s", PlayerIP);
SendClientMessage(playerid, YELLOW, string);
return 1;
}
pawn Код:
|
pawn Код:
|
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "You are not allowed to do that");
new PlayerIP[16], string[20], id;
GetPlayerIp(id, PlayerIP, sizeof(PlayerIP));
format(string, sizeof(string), "Player IP is:%s", PlayerIP);
SendClientMessage(playerid, YELLOW, string);
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "You are not allowed to do that");
new PlayerIP[16], string[20], id;
GetPlayerIp(id, PlayerIP, sizeof(PlayerIP));
format(string, sizeof(string), "Player IP is:%s", PlayerIP);
SendClientMessage(playerid, YELLOW, string);
return 1;
}