SA-MP Forums Archive
[Include] Compile a script from within your script. - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Compile a script from within your script. (/showthread.php?tid=225989)



Compile a script from within your script. - legodude - 14.02.2011

this is just a simple test function, but it works (quite surprised myself, haha)

pawn Код:
#define FILTERSCRIPT

#if defined MAX_FILENAME

#else
#define MAX_FILENAME (128)
#endif

#include <a_samp>
#include <exec>
/*
native Compile(filename[]);
*/


Compile(file[MAX_FILENAME])
{
format(file,sizeof(file),"start pawno/pawncc.exe %s",file);
exec(file);
}
thats it!
you only need to download This plugin (execute plugin by JaTochNietDan) and you're ready to go.
will most probably not work on some hosts as they not include the scripting package in the server root. you could try to upload the pawncc.exe and libraries to your host.

hope u make some nice scripts with it
suggestion: try to make a filterscript wich lets you debug ingame. (filemanager plugin so u can move it back to filterscripts) and then reloadfs (name) post the link here if u make it..


Re: Compile a script from within your script. - playbox12 - 14.02.2011

Ah good idea, such awesome. I am definitly going to try to do some stuff with this, really good.


Re: Compile a script from within your script. - Ash. - 14.02.2011

If used corretly, you could script everything from in game using this.


Re: Compile a script from within your script. - Stunt_Guy - 14.02.2011

Really Very Nice 9.9/10


Re: Compile a script from within your script. - kurta999 - 14.02.2011

How i can give the name, ex: a_samp.inc. pawno/includes/a_samp.inc ?

Anyway the samp-server.exe includes this function.


Re: Compile a script from within your script. - [L3th4l] - 14.02.2011

https://sampforum.blast.hk/showthread.php?tid=174033

But not bad i guess :d


Re: Compile a script from within your script. - Unknown123 - 14.02.2011

Nice idea :P

but, why dont use F6 in PAWNO? xD
I dident understand what you meant in first post, I have bad english xD!


Re: Compile a script from within your script. - Kwarde - 15.02.2011

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
This one ain't usin' a plugin, the other does. And this one's easier so if I need this ( I don't think I will ), I'm gonna use this one.
However, it's nice


Re: Compile a script from within your script. - RyDeR` - 15.02.2011

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
This one ain't usin' a plugin, the other does. And this one's easier so if I need this ( I don't think I will ), I'm gonna use this one.
However, it's nice
This one also do use a plugin.


Re: Compile a script from within your script. - Kwarde - 15.02.2011

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
This one also do use a plugin.
Oyeah I see it: That "exec" command xD
Stupid me. AGAIN