12.06.2011, 21:21
Quote:
You should take a look into antctrl by Westie.
|
First of all, you have to start the server relative to the directory. Thus, an approach similar to IronBoy is the only way:
Код:
cmd /C start /D "\server\dir\here" /B "samp-server.exe"
Why, you're asking me. Well, the SA-MP process doesn't daemonise - it freezes the webpage by in effect blocking the socket, so you'll have to trick it into doing so manually. I'll give you an example from my code - well, a simplified version of it:
PHP код:
$pCOM = new COM("WScript.Shell");
$pCOM->Run('cmd /C start /D "'.addslashes(COM_RELDIR).'" /B '.COM_EXEC, 0, false);