SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 30/05/2020, 11:51 AM   #1
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 141
Reputation: 265
Lightbulb [C++] SA:MP Plugin Template Library (samp-ptl)

SA:MP Plugin Template Library (samp-ptl)


Description:

C++17 template library that allows you to create your own plugins for SA:MP server very easy and fast.

Main features:
  • Safe C++ AMX API with errors handling
  • Pool of scripts (gamemode at the end)
  • Easy executing the callbacks (publics) with optional caching
  • Easy registration of natives: auto-conversion parameters from cell type to common C++ types. You may also define your own conversions
  • Logging
  • Checking for a version match between the plugin and scripts

Examples:
https://github.com/urShadow/samp-ptl...master/example
https://github.com/urShadow/Pawn.CMD
https://github.com/urShadow/Pawn.Regex

Source code:
https://github.com/urShadow/samp-ptl

Last edited by YourShadow; 31/05/2020 at 08:42 AM.
YourShadow is offline   Reply With Quote
Old 01/06/2020, 03:10 AM   #2
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,885
Reputation: 1337
Default Re: [C++] SA:MP Plugin Template Library (samp-ptl)

Another 5-Star release from you how could we expect any less?
Pottus is offline   Reply With Quote
Old 01/06/2020, 03:35 AM   #3
Unrea1
Gangsta
 
Unrea1's Avatar
 
Join Date: Oct 2013
Location: Venezuela
Posts: 819
Reputation: 129
Default Re: [C++] SA:MP Plugin Template Library (samp-ptl)

Your contributions are really excellent, 5 stars
__________________
Unrea1 is offline   Reply With Quote
Old 01/06/2020, 04:55 PM   #4
Whitetiger
Huge Clucker
 
Whitetiger's Avatar
 
Join Date: Nov 2007
Posts: 406
Reputation: 156
Default Re: [C++] SA:MP Plugin Template Library (samp-ptl)

Looks pretty cool man, wondering if you'd be interested in possibly implementing a PoC I wrote a few years back to determine from PAWN which plugins are loaded: https://github.com/Whitetigerswt/Dynamic_Natives. The technique is described on the GitHub page. I'm sure there's room for improvement as well.

I think it'd fit perfectly in some plugin framework to handle "behind-the-scenes". Let me know what you think.
__________________
GitHub

Author of SA-MP AC

Whitetiger is offline   Reply With Quote
Old 01/06/2020, 05:30 PM   #5
Eoussama
High-roller
 
Eoussama's Avatar
 
Join Date: Jul 2016
Location: Kingdom of Morocco // Tangier
Posts: 1,075
Reputation: 283
Default Re: [C++] SA:MP Plugin Template Library (samp-ptl)

Another 5 start contribution form you again, you're an inspiration, keep it up mate
__________________

|===[Web taxi]===|
List of my work
Github
Pastebin

|===[Interesting topics]===|
Semantic Versioning
Eoussama is offline   Reply With Quote
Old 01/06/2020, 07:54 PM   #6
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 141
Reputation: 265
Default Re: [C++] SA:MP Plugin Template Library (samp-ptl)

Quote:
Originally Posted by Whitetiger View Post
Looks pretty cool man, wondering if you'd be interested in possibly implementing a PoC I wrote a few years back to determine from PAWN which plugins are loaded: https://github.com/Whitetigerswt/Dynamic_Natives. The technique is described on the GitHub page. I'm sure there's room for improvement as well.

I think it'd fit perfectly in some plugin framework to handle "behind-the-scenes". Let me know what you think.
It's a very interesting idea. I will think about the implementation with minimum AMX overhead.
YourShadow is offline   Reply With Quote
Old 01/06/2020, 10:23 PM   #7
Whitetiger
Huge Clucker
 
Whitetiger's Avatar
 
Join Date: Nov 2007
Posts: 406
Reputation: 156
Default Re: [C++] SA:MP Plugin Template Library (samp-ptl)

Quote:
Originally Posted by YourShadow View Post
It's a very interesting idea. I will think about the implementation with minimum AMX overhead.
Sure, hit me up in a PM or the steam in my signature and I can try to clarify if you misunderstand something. The SA-MP AC link in my signature was also using this technique, so you could check that plugin for more than just a PoC.
__________________
GitHub

Author of SA-MP AC

Whitetiger is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Samp template LifeRah Everything and Nothing 16 01/02/2016 03:30 PM
Missed library (SKY Plugin) IDarkness Server Support 8 07/10/2015 12:55 AM
[Tool/Web/Other] SIMPLE SAMP TEMPLATE MouizGhouri Tools and Files 2 28/06/2015 01:15 AM
Samp php trucking template Toby_Manley General 2 26/05/2012 02:44 PM
What template to choose for the plugin ? Donny_k Plugin Development 10 24/05/2009 12:18 AM


All times are GMT. The time now is 03:57 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.