Log in

View Full Version : C++ scripting



foxtacles
08-22-2011, 09:22 PM
C++ scripts are one of the new features of the next version :D See the screenshot for a preview.

CTCCoco
08-22-2011, 10:34 PM
C++ scripts are one of the new features of the next version :D See the screenshot for a preview.


Good for pro scripters.

Lorenc
08-23-2011, 08:10 AM
I'm going to be converting efficient librarys soon. Include bits and will make a tutorial to hook callbacks.

Sweet stuff recycler :) Looks pretty nice to be coding with C++ some plugins. I like it, might do both C++ and PAWN

Thanks a lot

Lorenc
08-23-2011, 11:40 AM
Sorry for this double post:

Can you release the example format and the includes to making a plugin? And also include how to install it to the server, this is really interesting.

Houstin
08-24-2011, 03:36 AM
I will make you the best C++ scripts I can. I <3 C++ 4EVER. Oh, and I might make a NASM script example too. I like nasm alot.

foxtacles
08-24-2011, 03:53 PM
NASM is awesome. I assembled the PAWN abstract machine in NASM ;D

Heres the new scripting facilities. Note that I didn't put in most game functions and callbacks, it's only to show how it will look and work like (no 'official' release):

All files related to scripting (https://code.brickster.net/listing.php?repname=Vault-Tec+Multiplayer+Mod&path=%2Ftrunk%2Fvaultscript%2F )

C++ script example (https://code.brickster.net/filedetails.php?repname=Vault-Tec+Multiplayer+Mod&path=%2Ftrunk%2Fvaultscript%2F vaultscript.cpp)
C++ script header, or 'include' (https://code.brickster.net/filedetails.php?repname=Vault-Tec+Multiplayer+Mod&path=%2Ftrunk%2Fvaultscript%2F vaultscript.h)

PAWN script example (https://code.brickster.net/filedetails.php?repname=Vault-Tec+Multiplayer+Mod&path=%2Ftrunk%2Fvaultscript%2F pawnc%2Fstandard.pwn)
PAWN script include (https://code.brickster.net/filedetails.php?repname=Vault-Tec+Multiplayer+Mod&path=%2Ftrunk%2Fvaultscript%2F pawnc%2Finclude%2Fvaultmp.inc)

The scripts do exactly the same. Click the 'SVN' button to access the raw files ;)

Lorenc
08-26-2011, 08:10 AM
I will make you the best C++ scripts I can. I <3 C++ 4EVER. Oh, and I might make a NASM script example too. I like nasm alot.


Do you have enough knowledge to make some plugins compatible with Vault-Tec? Like sscanf 2 and mysql/sql?

There are pre-made ones on www.sa-mp.com that you can convert, it'd be damn impressive if you could so we can keep up to the latest and efficient library's.

Houstin
08-26-2011, 09:08 AM
@Lorenc: I will not be doing anything for PAWN for too many reasons to list here. However, other people may create PAWN wrappers for some of the Vault-MP Standard Library. I suggest PAWN scripters learn about C++0x, as it will be relatively simple to convert their pawn scripts to it and they will be extremely better. Eventually, I may make some tutorials for the transitions.

Lorenc
08-26-2011, 02:30 PM
@Lorenc: I will not be doing anything for PAWN for too many reasons to list here. However, other people may create PAWN wrappers for some of the Vault-MP Standard Library. I suggest PAWN scripters learn about C++0x, as it will be relatively simple to convert their pawn scripts to it and they will be extremely better. Eventually, I may make some tutorials for the transitions.


sscanf is the primary plugin I need. I can plan on using the old sscanf 1 for PAWN but it doesn't have as many parameters as sscanf2 does. and sscanf2 is a unbelievably plugin. I'll try do something though.

Houstin
08-27-2011, 04:28 AM
If you want the most efficient code/libraries, then simply use C++. It generates native code, so the speed is uncomparable to anything else. You can have enumerations, custom structures, object orientation, pointers, everything. It's not even that hard, either. C++ features will NOT be removed, unlike PAWN. I would not claim that anything is efficient, unless it is native code. How to learn this amazing thing? www.google.com C++ has the more code written for it than any other language. Anything you can imagine has probably been coded before. And C++ just continues to get updated. C++0x compilers will be complete very soon, and will make it better and easier to learn.

Aeronix
08-27-2011, 05:22 AM
Houstin what IDE and compiler do you use?

Houstin
08-29-2011, 09:08 AM
I use Visual Studio 2010 for my projects that don't need to be cross compatible. For my vaultmp serverside projects, though, I will use Code::Blocks so it'll be easier to write and compile things for unix. Debian Linux is great for dedicated servers.

Aeronix
08-29-2011, 09:36 AM
I use Visual Studio 2010 for my projects that don't need to be cross compatible. For my vaultmp serverside projects, though, I will use Code::Blocks so it'll be easier to write and compile things for unix. Debian Linux is great for dedicated servers.

Ah okay, CodeBlocks is great although I can never seem to understand developing a windows application in C++ mainly due to it being a mindf**k

Dantiko
10-11-2011, 06:08 PM
I'll start my programing class monday

Volumed
10-11-2011, 06:15 PM
I'll start my programing class monday


Have some good years of learning, hope that you are not hoping to much because that only works in your disadvantage i mean with helping in the project.

TommyB
10-11-2011, 11:28 PM
I don't really get it. VaultMP supports both PAWN and C++?

Houstin
10-12-2011, 02:18 AM
I don't really get it. VaultMP supports both PAWN and C++?

Yes.

TommyB
10-12-2011, 07:44 AM
Will they be used together? Or will it just be "You script your server with PAWN, or C++."

Houstin
10-12-2011, 07:54 AM
Will they be used together? Or will it just be "You script your server with PAWN, or C++."


You get to have it your way. ( mix them up, or just use one )

foxtacles
10-12-2011, 04:09 PM
You can run as many scripts written in C++ / PAWN parallel as you want (in case of the results of callbacks, the last script defined will override the previous callback results). You can even build simple interfaces to scripts ;)

TommyB
10-14-2011, 12:53 AM
Ahh, I get it now. Thanks for the help!