Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. forward Httpipgetintel(index, response_code, data[]);
  2. #define DIALOG_PROXYKICK 1
  3.  
  4. public OnPlayerConnect(playerid)
  5. {
  6. new ip[16];
  7. GetPlayerIp(playerid, ip, sizeof ip);
  8. format(string, sizeof string, "http://check.getipintel.net/check.php?ip=%s&contact=jdhenaogranada@hotmail.com", ip);
  9. HTTP(playerid, HTTP_GET, string, "", "Httpipgetintel");
  10. return 1;
  11. }
  12.  
  13. public Httpipgetintel(index, response_code, data[])
  14. {
  15. if(response_code == 200)
  16. {
  17. if(data[0] == '1')
  18. {
  19. ShowPlayerDialog(playerid, DIALOG_PROXYKICK, DIALOG_STYLE_MSGBOX, "IMPORTANT", "Proxy isn't allowed, make sure you remove it before you join!", "Close", "");
  20. Kick(playerid);
  21. return 1;
  22. }
  23. if(data[0] == '0')
  24. {
  25. return 1;
  26. }
  27. else
  28. {
  29. printf("The request failed! The response code was: %d", response_code);
  30. }
  31. }
  32. return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement