Advertisement
DraKiNs

[COD] Classe Ligar Servidor SA:MP

Jun 26th, 2011
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. // ======== [ No Código PHP ] ===================
  2. <?php
  3.  
  4. //executar
  5. $server = new ClasseExecucao();
  6. $server->Start();
  7.  
  8. //classe
  9. class ClasseExecucao
  10. {
  11.     private function Run($sCommand)
  12.     {
  13.         $sCommand = 'cmd /C '.$sCommand;
  14.         $param = new COM("WScript.Shell");
  15.         $param->Run($sCommand, 0, false);
  16.         return true;
  17.     }
  18.  
  19.     public function Start()
  20.     {      
  21.    //caminho
  22.         $exec = 'start "Servidor" "C:\Arquivos de programas\EasyPHP-5.3.6.0\www\porra loka\Servidor\Users\7777\samp-server.bat" ';
  23.         $this->Run($exec);
  24.         return true;
  25.     }
  26.  
  27. }
  28. ?>
  29.  
  30. // =========== [ NO samp-server.bat ] ======================
  31.  
  32. @echo off
  33. cd "C:\Arquivos de programas\EasyPHP-5.3.6.0\www\porra loka\Servidor\Users\7777\"
  34. start samp-server.exe
  35.  
  36.  
  37. // Criado por Bruno da Silva
  38. // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement