Advertisement
Guest User

asd

a guest
Jul 12th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. function CheckClassIP(playerid) {
  2. new query[180], playerserial[128];
  3. gpci(playerid,playerserial,sizeof(playerserial));
  4.  
  5. format(query, sizeof(query), "SELECT * FROM `ipbans` WHERE `Serial`='%s'", playerserial);
  6. new Cache: result = mysql_query(SQL, query);
  7. new test = cache_get_row_count ();
  8.  
  9. if(test != 0) {
  10. new string[180], name[MAX_PLAYER_NAME], by[MAX_PLAYER_NAME], date[100], reason[64];
  11. cache_get_field_content(0, "Name", name);
  12. cache_get_field_content(0, "By", by);
  13. cache_get_field_content(0, "Date", date);
  14. cache_get_field_content(0, "Reason", reason);
  15. for( new j = 0; j <= 100; j++) SendClientMessage(playerid, COLOR_WHITE, "");
  16. format(string, sizeof(string), "Acest cont este banat permanent pe IP de %s de pe %s!", by, date);
  17. SCM(playerid, COLOR_WARNING, string);
  18. format(string, sizeof(string), "Contul pe care s-a luat ban este %s.", name);
  19. SCM(playerid, COLOR_CLIENT, string);
  20. format(string, sizeof(string), "Motivul: %s", reason);
  21. SCM(playerid, COLOR_CLIENT, string);
  22. format(string, sizeof(string), "Daca consideri ca ai primit ban aiurea, fa o cerere de unban pe burned.ro/panel/unbans!", reason);
  23. SCM(playerid, COLOR_CLIENT, string);
  24.  
  25. SetPlayerCameraPos(playerid, 1183.0143, -965.7394, 129.6071);
  26. SetPlayerCameraLookAt(playerid, 1183.7214, -965.0270, 129.2470);
  27. TogglePlayerSpectating(playerid, 0);
  28. KickEx(playerid);
  29. }
  30. else {
  31. GameTextForPlayer(playerid, " ", 1000, 4);
  32. new string[180];
  33. if(RegistrationStep[playerid] == 0 && IsPlayerLogged[playerid] != 1) {
  34. SetPlayerFacingAngle(playerid, 3.41);
  35. SetPlayerPosEx(playerid, 1479.3499, -1748.4355, 45.1615);
  36. SetPlayerInterior(playerid, 0);
  37. TogglePlayerControllable(playerid, 0);
  38.  
  39. if(PlayerAccount[playerid] != 0) {
  40. new laston[64], field[128];
  41. format(field,128,"SELECT `lastOn` FROM users WHERE `name`='%s'",GetName(playerid));
  42. mysql_query(SQL,field);
  43. mysql_store_result();
  44. if(mysql_retrieve_row()) mysql_fetch_field_row(laston, "lastOn");
  45. mysql_free_result();
  46. format(string, sizeof(string), "Bine ai revenit, %s!\nTasteaza in casuta de mai jos parola contului tau.\n\nUltima logare: {FFFFFF}%s",GetName(playerid),laston);
  47. ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"Logare", string,"Logare","Quit");
  48. }
  49. else {
  50. PlayerAccount[playerid] = 0;
  51. format(string, sizeof(string), "Bine ai venit, %s!\nAcest cont nu este inregistrat.\n\nPentru a-ti creea unul, introdu o parola in casuta de mai jos.",GetName(playerid));
  52. ShowPlayerDialog(playerid, DIALOG_LOGIN1,DIALOG_STYLE_PASSWORD,"Register", string,"Register","Quit");
  53. }
  54. }
  55. }
  56. cache_delete(result);
  57. return 1;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement