Run shell script from GM
#1

Is it posible to run shell script directly from GameMod?
Reply
#2

Not with standard PAWN you could create a plugin that allows you to execute commands from the shell.
Reply
#3

You can also with standart

make a php script with shell script in it, and use HTTP function to call it
Reply
#4

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).
Reply
#5

HTTP is standart :P
Reply
#6

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.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)