Advertisement
TheNewKid

Comandos IP

Jul 11th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1.             else if (!strcmp(innerCmd, "+ip"))
  2.             {
  3.                 char name[16] = { 0, };
  4.                 if (sscanf_s(innerMsg, "%15s", name, _countof(name)))
  5.                 {
  6.                     auto status = NativeFunctions::getUserByName(name);
  7.                     if (status >= 0)
  8.                     {
  9.                         NativeFunctions::sendClientMessage(client, Functions::stringFormat("Player: [%s] IP: [%d]", name, user->IP));
  10.                         return true;
  11.                     }
  12.                     else
  13.                     {
  14.                         NativeFunctions::sendClientMessage(client, "Jogador não esta online.");
  15.                         return true;
  16.                     }
  17.                 }
  18.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement