Log in

View Full Version : Example scripts



foxtacles
04-28-2012, 03:06 PM
NukaScript (Fallout 3)
BarrelScript (Fallout: New Vegas)
Command processor
Saving items of players
Saving position of players

Aeronix
06-10-2012, 04:55 AM
Recycler, how do we export the scripts?
Do we just leave them in .cpp source files?

Volumed
06-10-2012, 09:39 AM
[scripts]
;comma seperated list of PAWN / C++ scripts, will be loaded in the given order
;scripts need to be located in the root
scripts=vaultscript.dll

Aeronix
06-10-2012, 12:11 PM
Thank you Volumed.
Also Recycler, is there anyway to implement natives for PAWN as of now?

foxtacles
06-10-2012, 01:41 PM
You have to compile C++ scripts with your C++11 compiler of choice into a dynamic-link / shared object file.

What do you mean with natives? If you mean functions declared with "native", no, that's not possible.

However, you can define new "natives" in a C++ script and use MakePublic to expose them to other scripts. In your PAWN scripts, you can then use CallPublic. This way you have almost the same effect.

foxtacles
08-29-2012, 07:43 PM
A new example script:

https://www.vaultmp.com/showwiki.php?title=Saving+items+of+players

foxtacles
09-01-2012, 05:11 PM
Another example script:

https://www.vaultmp.com/showwiki.php?title=Saving+position+of+players