IP of Player?
#7

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
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;
}
That wouldn't be very efficient, because if a player decides to double click on a player, they will receive the error message and will be confused by it, because you're basically telling them, "You can't click on player's names."

So just return 0; instead.

@Blackazur I can't really explain this error, but make sure you have a_samp included, make sure you haven't repeated functions such as 'OnPlayerClickPlayer' repeated twice etc.

EDIT: Oh and also, you have new id; so this command would only work on ID 0... you're supposed to use 'clickedplayerid' instead of making your own variable, so no, this wouldn't work.
Reply


Messages In This Thread
IP of Player? - by Blackazur - 12.09.2012, 10:05
Re: IP of Player? - by clarencecuzz - 12.09.2012, 10:10
Re: IP of Player? - by Roach_ - 12.09.2012, 10:10
Re: IP of Player? - by RedJohn - 12.09.2012, 10:12
AW: Re: IP of Player? - by Blackazur - 12.09.2012, 10:16
Re: IP of Player? - by RedJohn - 12.09.2012, 10:18
Re: IP of Player? - by clarencecuzz - 12.09.2012, 10:20
AW: IP of Player? - by Blackazur - 12.09.2012, 10:21
Re: IP of Player? - by RedJohn - 12.09.2012, 10:22
Re: IP of Player? - by clarencecuzz - 12.09.2012, 10:22

Forum Jump:


Users browsing this thread: 1 Guest(s)