Run shell script from GM - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Run shell script from GM (
/showthread.php?tid=348909)
Run shell script from GM -
Dragony92 - 07.06.2012
Is it posible to run shell script directly from GameMod?
Re: Run shell script from GM -
iggy1 - 07.06.2012
Not with standard PAWN you could create a plugin that allows you to execute commands from the shell.
Re: Run shell script from GM -
ikey07 - 07.06.2012
You can also with standart
make a php script with shell script in it, and use HTTP function to call it
Re: Run shell script from GM -
iggy1 - 07.06.2012
Php isn't PAWN so it's not standard PAWN. Either way you will need to make a plugin or PhP script.
I would prefer the plugin over a PhP script (because i don't know PhP).
Re: Run shell script from GM -
ikey07 - 07.06.2012
HTTP is standart :P
Re: Run shell script from GM -
iggy1 - 07.06.2012
But what are you going to do with HTTP if you have no PhP script? Nothing. Can PhP execute commands from the command line of your server? I'm not sure i know very little about PhP.
Besides a plugin would work much better and will be a lot faster than waiting for a HTTP response.
EDIT: There is a plugin called "execute" that might already do what you need. I can't remember if theres a linux version though.
Re: Run shell script from GM -
mati233 - 07.06.2012
if you use it like this:
HTTP(playerid, HTTP_HEAD, url, "", "MyHttpResponse");
The server will just send the request and wont wait for the answer, so it wont cause any lag.