hlmod.hu
https://hlmod.hu/

IP figyelő
https://hlmod.hu/viewtopic.php?f=29&t=21336
Oldal: 1 / 1

Szerző:  Applee [ 2015.07.02. 20:29 ]
Hozzászólás témája:  IP figyelő

Sziasztok!
Kérhetnék egy olyan plugint, ami a szerverre 2 ugyan olyan IP címmel ne tudjanak feljönni?

Szerző:  Dave87 [ 2015.07.06. 05:58 ]
Hozzászólás témája:  Re: IP figyelő

Tessék, próbáld meg. Ha nem menne, jelezd.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "1 jatekos, 1 IP"
  4. #define VERSION "0.1"
  5. #define AUTHOR "Dave87"
  6.  
  7. #pragma semicolon 1
  8.  
  9. new Trie:IPcimek;
  10.  
  11. public plugin_init()
  12. {
  13. register_plugin(PLUGIN, VERSION, AUTHOR);
  14.  
  15. IPcimek = TrieCreate();
  16. }
  17.  
  18. public plugin_end()
  19. TrieDestroy(IPcimek);
  20.  
  21. public client_connect(id)
  22. {
  23. static IPcim[16];
  24. get_user_ip(id, IPcim, charsmax(IPcim), 1);
  25.  
  26. if (TrieKeyExists(IPcimek, IPcim))
  27. server_cmd("kick #%d ^"Errol az IP cimrol mar csatlakoztak, ezert kickelve lettel!!^"", get_user_userid(id));
  28. else
  29. TrieSetCell(IPcimek, IPcim, 1);
  30. }
  31.  
  32. public client_disconnect(id)
  33. {
  34. static IPcim[16];
  35. get_user_ip(id, IPcim, charsmax(IPcim), 1);
  36.  
  37. TrieDeleteKey(IPcimek, IPcim);
  38. }


Applee írta:
Sziasztok!
Kérhetnék egy olyan plugint, ami a szerverre 2 ugyan olyan IP címmel ne tudjanak feljönni?

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/