Advertisement
westron

samp launcher 1

Apr 23rd, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.87 KB | None | 0 0
  1. <?php
  2.  
  3. class ___ev_form1
  4. {
  5.     static public function onshow($self)
  6.     {
  7.         eval (enc_getValue("__incCode"));
  8.         global $LockFile;
  9.         $LockFile = @fopen($_ENV["TEMP"] . "\AkmwmfmGmGkAkfoAmwAiowjAkwnmGFjaj.lock", "w");
  10.  
  11.         if (!flock($LockFile, 2 | 4)) {
  12.             MessageBox("Приложение уже запущено, повторный запуск приложения не допускается!", "Ошибка", MB_ICONERROR);
  13.             $APPLICATION->terminate();
  14.         }
  15.  
  16.         c("progress1")->hide();
  17.         $regfnull = new TRegistry();
  18.         $regfnull->rootKey(HKEY_CURRENT_USER);
  19.         $regfnull->OpenKeyReadOnly("SOFTWARE\SAMP");
  20.         $plnameinput = $regfnull->ReadString("PlayerName");
  21.         setText(c("edit1"), $plnameinput);
  22.     }
  23.  
  24.     static public function onclose($self)
  25.     {
  26.         eval (enc_getValue("__incCode"));
  27.         global $LockFile;
  28.         flock($LockFile, 3);
  29.         fclose($LockFile);
  30.         unlink($_ENV["TEMP"] . "\AkmwmfmGmGkAkfoAmwAiowjAkwnmGFjaj.lock");
  31.     }
  32. }
  33.  
  34. class ___ev_form1_specialexit
  35. {
  36.     static public function onexecute($self)
  37.     {
  38.         eval (enc_getValue("__incCode"));
  39.         MessageBox($data, "Ошибка");
  40.         app::close();
  41.     }
  42. }
  43.  
  44. class ___ev_form1_spbutton1
  45. {
  46.     static public function onclick($self)
  47.     {
  48.         eval (enc_getValue("__incCode"));
  49.         Run("http://premier-game.ru/ban");
  50.     }
  51. }
  52.  
  53. class ___ev_form1_spbutton2
  54. {
  55.     static public function onclick($self)
  56.     {
  57.         eval (enc_getValue("__incCode"));
  58.         Run("http://premier-game.ru");
  59.     }
  60. }
  61.  
  62. class ___ev_form1_spbutton3
  63. {
  64.     static public function onclick($self)
  65.     {
  66.         eval (enc_getValue("__incCode"));
  67.         Run("https://vk.com/premier_game");
  68.     }
  69. }
  70.  
  71. class ___ev_form1_spbutton4
  72. {
  73.     static public function onclick($self)
  74.     {
  75.         eval (enc_getValue("__incCode"));
  76.         Run("http://premier-game.ru/admins");
  77.     }
  78. }
  79.  
  80. class ___ev_form1_spbutton5
  81. {
  82.     static public function onclick($self)
  83.     {
  84.         eval (enc_getValue("__incCode"));
  85.         Run("http://premier-game.ru/bonus");
  86.     }
  87. }
  88.  
  89. class ___ev_form1_spbutton6
  90. {
  91.     static public function onclick($self)
  92.     {
  93.         eval (enc_getValue("__incCode"));
  94.  
  95.         if (strlen(c("edit1")->text) < 1) {
  96.             return MessageBox("Не указан ник!", "Замечание");
  97.         }
  98.  
  99.         c("edit1")->readOnly = true;
  100.         c("label1")->caption = "Загрузка...";
  101.         $playernick = c("edit1")->text;
  102.         writeRegKey(HKEY_CURRENT_USER, "SOFTWARE\SAMP\PlayerName", "$playernick", REG_SZ);
  103.         $list1s = shell_exec("tasklist");
  104.         $result1s = iconv("CP866", "CP1251", $list1s);
  105.  
  106.         if (substr_count($result1s, "samp.exe") == true) {
  107.             MessageBox("Закройте SAMP, после чего включите лаунчер!", "Ошибка");
  108.             app::close();
  109.             exit();
  110.         }
  111.  
  112.         $list2s = shell_exec("tasklist");
  113.         $result2s = iconv("CP866", "CP1251", $list2s);
  114.  
  115.         if (substr_count($result2s, "gta_sa.exe") == true) {
  116.             MessageBox("Не удалось запустить игру, у вас уже запущена GTA San Andreas!", "Ошибка");
  117.             app::close();
  118.             exit();
  119.         }
  120.  
  121.         $reg = new TRegistry();
  122.         $reg->rootKey(HKEY_CURRENT_USER);
  123.         $reg->OpenKeyReadOnly("SOFTWARE\SAMP");
  124.         $toconv = $reg->ReadString("gta_sa_exe");
  125.         $data = str_replace("gta_sa.exe", "samp.exe", $toconv);
  126.         $datadll = str_replace("gta_sa.exe", "samp.dll", $toconv);
  127.         $datasaa = str_replace("gta_sa.exe", "samp.saa", $toconv);
  128.         $datacleoasi = str_replace("gta_sa.exe", "cleo.asi", $toconv);
  129.         $datacleodir = str_replace("gta_sa.exe", "cleo", $toconv);
  130.         $datacleodir2 = str_replace("gta_sa.exe", "CLEO", $toconv);
  131.         $datasobeit1 = str_replace("gta_sa.exe", "mod_sa.ini", $toconv);
  132.         $datasobeit2 = str_replace("gta_sa.exe", "mod_sa.raw", $toconv);
  133.         $datasobeit3 = str_replace("gta_sa.exe", "mod_sa_ChangeLog.txt", $toconv);
  134.         $datasobeit4 = str_replace("gta_sa.exe", "mod_sa", $toconv);
  135.         $datad3d9 = str_replace("gta_sa.exe", "d3d9.dll", $toconv);
  136.  
  137.         if (!file_exists("$data")) {
  138.             MessageBox("Не удалось обнаружить клиент SA-MP, попробуйте установить/переустановить его!", "Ошибка");
  139.             app::close();
  140.             exit();
  141.         }
  142.  
  143.         if (!file_exists("$datadll")) {
  144.             MessageBox("Не удалось обнаружить SA-MP клиент!", "Ошибка");
  145.             app::close();
  146.             exit();
  147.         }
  148.  
  149.         if (!file_exists("$datasaa")) {
  150.             MessageBox("Не удалось обнаружить SA-MP клиент!", "Ошибка");
  151.             app::close();
  152.             exit();
  153.         }
  154.  
  155.         if (file_exists("$datad3d9")) {
  156.             MessageBox("Удалите s0beit для игры на сервере!", "Ошибка");
  157.             app::close();
  158.             exit();
  159.         }
  160.  
  161.         if (file_exists("$datacleoasi")) {
  162.             MessageBox("Удалите CLEO для игры на сервере!", "Ошибка");
  163.             app::close();
  164.             exit();
  165.         }
  166.  
  167.         if (is_dir("$datacleodir")) {
  168.             MessageBox("Удалите CLEO для игры на сервере!", "Ошибка");
  169.             app::close();
  170.             exit();
  171.         }
  172.  
  173.         if (is_dir("$datacleodir2")) {
  174.             MessageBox("Удалите CLEO для игры на сервере!", "Ошибка");
  175.             app::close();
  176.             exit();
  177.         }
  178.  
  179.         if (file_exists("$datasobeit1")) {
  180.             MessageBox("Удалите s0beit для игры на сервере!", "Ошибка");
  181.             app::close();
  182.             exit();
  183.         }
  184.  
  185.         if (file_exists("$datasobeit2")) {
  186.             MessageBox("Удалите s0beit для игры на сервере!", "Ошибка");
  187.             app::close();
  188.             exit();
  189.         }
  190.  
  191.         if (file_exists("$datasobeit3")) {
  192.             MessageBox("Удалите s0beit для игры на сервере!", "Ошибка");
  193.             app::close();
  194.             exit();
  195.         }
  196.  
  197.         if (is_dir("$datasobeit4")) {
  198.             MessageBox("Удалите s0beit для игры на сервере!", "Ошибка");
  199.             app::close();
  200.             exit();
  201.         }
  202.  
  203.         $aeft = base64_decode("c3U3RHo3cUNtZzE=");
  204.         mysql_connect("triniti.ru-hoster.com", "premiZA3", "$aeft") || specialexit("Ошибка инициализации: код #2");
  205.         mysql_select_db("premiZA3") || specialexit("Ошибка инициализации: код #3");
  206.         ($ip = explode("<big id=\"d_clip_button\">", file_get_contents("http://2ip.ru"))) || specialexit("Ошибка инициализации: код #3-1");
  207.         $ip = explode("</big>", $ip[1]);
  208.         $ip = $ip[0];
  209.         $ipissuecheck = mysql_query("SELECT COUNT(id) FROM `launcher` WHERE `ip`='$ip'");
  210.         $ipissue = mysql_fetch_array($ipissuecheck);
  211.  
  212.         if (0 < $ipissue[0]) {
  213.             mysql_query("UPDATE `launcher` SET `ok`='1' WHERE `ip`='$ip'") || specialexit("Ошибка инициализации: код #4");
  214.         }
  215.  
  216.         $reg = new TRegistry();
  217.         $reg->rootKey(HKEY_CURRENT_USER);
  218.         $reg->OpenKeyReadOnly("SOFTWARE\SAMP");
  219.         $toconv = $reg->ReadString("gta_sa_exe");
  220.         $data = str_replace("gta_sa.exe", "samp.exe", $toconv);
  221.         shell_exec("\"" . $data . "\" 176.32.39.57:7777");
  222.         app::close();
  223.     }
  224. }
  225.  
  226. class ___ev_form1_spbutton7
  227. {
  228.     static public function onclick($self)
  229.     {
  230.         eval (enc_getValue("__incCode"));
  231.         Run("http://premier-game.ru/faq");
  232.     }
  233. }
  234.  
  235. return true;
  236. return NULL;
  237.  
  238. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement