Plugin vs Pawn script
#1

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++?
Reply
#2

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

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

Bump, still need answer.
Reply
#5

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

C++ Has a ton more possibilities,
Reply
#7

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

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++
Reply
#9

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

Thanks guys !
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)