jlalt

IRCCMDGETIP

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