Posts: 367
Threads: 55
Joined: Oct 2011
Reputation:
0
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++?
pawn is a c++ based language, just remember this.
Posts: 367
Threads: 55
Joined: Oct 2011
Reputation:
0
So which variant is better? Write script with C++ or write the same script with pawn?
Posts: 1,317
Threads: 23
Joined: Feb 2010
Reputation:
0
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.
Posts: 1,662
Threads: 199
Joined: Dec 2011
Reputation:
0
C++ Has a ton more possibilities,
Posts: 6,129
Threads: 36
Joined: Jan 2009
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.
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
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.