Advertisement
jlalt

IRCCMD:GETIP

Aug 22nd, 2015
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.79 KB | None | 0 0
  1. IRCCMD:getip(botid, channel[], user[], host[], params[])
  2. {
  3.     if (IRC_IsHalfop(botid, channel, user))
  4.     {
  5.             new player1 = strval(params);
  6.             if(isnull(params)) return IRC_GroupSay(gGroupID, channel, "Usge: !getip id");
  7.             if (IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
  8.             {
  9.                 new playername[MAX_PLAYER_NAME], string[128], tmp3[50];
  10.                 GetPlayerIp(player1, tmp3, 50);
  11.                 GetPlayerName(player1, playername, sizeof(playername));
  12.                 format(string, sizeof(string), "Name : %s ID: %d IP: %s", PlayerName2(player1), player1, tmp3);
  13.                 IRC_GroupSay(gGroupID, channel, string);
  14.             } else return IRC_GroupSay(gGroupID, channel, "ERROR: Player is not connected");
  15.         } else return IRC_GroupSay(gGroupID, channel, "ERROR: You need to be HalfOp to use this Command.");
  16.     return 1;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement