Guest User

Untitled

a guest
Dec 14th, 2019
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. forward FindPlayerInTableIPBan(playerid);
  2. public FindPlayerInTableIPBan(playerid)
  3. {
  4. new rows;
  5. cache_get_row_count(rows);
  6. if(!rows)
  7. {
  8. SendClientMessage(playerid,-1, "Ваш аккаунт не заблокирован по IP.");
  9. return 1;
  10. }
  11. else {
  12. new querybans[60+16+11+11],secon,secon1;
  13. cache_get_value_name_int(0, "unixtime", secon);
  14. secon1 = gettime();
  15. if(secon1 >= secon) {
  16. format(querybans, sizeof(querybans), "DELETE FROM `banip` WHERE `player_name` = '%s'",name12[playerid]);
  17. mysql_tquery(mysql_connect_ID, querybans, "","");
  18. SendClientMessage(playerid,-1,"Аккаунт успешно разблокирован по IP!");
  19. return true;
  20. }
  21. else {
  22. new i2[11],i3[11],i1[16];
  23. cache_get_value_name(0,"dateunban",i2);
  24. cache_get_value_name(0,"timeunban",i3);
  25. cache_get_value_name(0,"ipban",i1);
  26. static const text[] =
  27. "Ваш IP адрес %s заблокирован! Блокировка будет снята %s %s.";
  28. format(querybans, sizeof (querybans), text, i1, i2,i3);
  29. ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Блокировка IP", querybans, "Хорошо", "");
  30. return 1;
  31. }
  32. }
  33. }
RAW Paste Data