SA-MP Forums Archive
Plugin vs Pawn script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Plugin vs Pawn script (/showthread.php?tid=351559)



Plugin vs Pawn script - zgintasz - 16.06.2012

Hi guys,

I have some questions. Which variant is better, writing script with C++(creating a plugin, using invoke) or writing a script with pawn? If C++ is so good, why sa-mp scripting language is pawn, not C++?


Re: Plugin vs Pawn script - kikito - 16.06.2012

pawn is a c++ based language, just remember this.


Re: Plugin vs Pawn script - zgintasz - 16.06.2012

So which variant is better? Write script with C++ or write the same script with pawn?


Re: Plugin vs Pawn script - zgintasz - 17.06.2012

Bump, still need answer.


Re: Plugin vs Pawn script - playbox12 - 17.06.2012

Written in PAWN is always faster than writing a plugin, it has to communicate with a PAWN script in the end anyway, it'll always be slower. However there will be some scenarios where it could be faster though, I don't have specifics.

If you do feel like writing it in C++, you should use Zeex's GDK, the later versions are much more stable (and it's way faster than invoke, from what I've heard). For a completely underbuild anwser you should wait for a plugin developer.


Re: Plugin vs Pawn script - milanosie - 17.06.2012

C++ Has a ton more possibilities,


Re: Plugin vs Pawn script - Calgon - 17.06.2012

Quote:
Originally Posted by milanosie
Посмотреть сообщение
C++ Has a ton more possibilities,
So just make plugins for those "possibilities" and stick to Pawn for the actual script.


Re: Plugin vs Pawn script - milanosie - 17.06.2012

Quote:
Originally Posted by Calgon
Посмотреть сообщение
So just make plugins for those "possibilities" and stick to Pawn for the actual script.
Agree,

If something is possible in pawn, write it in pawn.
If its not and there is no decent alternative, use C++


Re: Plugin vs Pawn script - Mauzen - 17.06.2012

Plugins are good for complex calculations that need to go fast. I use a plugin e.g. for hitbox detection, as a pure pawn script this wouldnt be useable, as it is at least 10x slower than the plugin.
Writing a full gamemode as a plugin works and also allows some nice code tricks, but is extremely ugly. The need to invoke every samp native makes the whole thing really hard to read, and also increases the work for writing it.


Re: Plugin vs Pawn script - zgintasz - 18.06.2012

Thanks guys !