12.03.2014, 21:45

Quote:
Preface: I started to write this project 2 years ago but I stopped this project because of my school 1.85 years ago. I saw the part of codes belong to my Squirrel wrapper and started to rewrite again. I wrote it again. |
- I made this project for people who is bored of the noob Pawn. You can use both C++ and C to write more powerful things then Pawn but this is hard to do. You can ask me: "Why you chose Squirrel, not .Net". First I hate Windows. Second I need a dynamic language.
Why Squirrel?
- Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications
Timings?
According to my measurements, Squirrel finishes jobs before Pawn. (100-200 ms) [Thanks SAMPGDK]
Features:
- Resource System = [ Interactive coding with lots of files. ] [Inspired by MTA]
- Element System = [Every Object is an element in my plugin. ] [Inspired by MTA]
- Event System = [ Interactive coding with lots of events ] [Inspired by MTA]
- Command System = [Easy to handle commands.] [Inspired by MTA]
- Integrated XML & File Functions
- It's open to develop. You can both develop the SQWrapper and your own module for it.
- OOP!
Downloads:
Server Folder: Download
Source (sqsrc, sqdevkitsrc, sqmysqlsrc) : Download
Examples:
Lets make a test resource.
-> Create a folder in squirrel-mods/resources named "test"
-> Create two file in "test" named "meta.xml" "test.nut"
-> Open "meta.xml" and write:
Код:
<meta> <info name="Test SQWrapper" author="Skyline." version="1.0" description="SQWrapper..." /> <script src="test.nut" /> </meta>
Код:
class HelloClass { static function onResourceStart() { // Source: Started resource, in this case this resource because we've added the event for just this resource. print("Hello from " + getResourceName(source)); } } addEvent("onResourceStart", getThisResource(), HelloClass.onResourceStart); function onPlayerConnect() { // Source: The Player Element sendClientMessage( source, 0xFFAE00FF, "Hello!"); return true; // It's important. } addEvent("onPlayerConnect", getRootElement(), onPlayerConnect); function onPlayerDisconnect( reason ) { // Source: The Player Element sendClientMessage( source, 0xFFAE00FF, "Bye!"); return true; // It's important. } addEvent("onPlayerDisconnect", getRootElement(), onPlayerDisconnect);
-> You can start resource at server-start squirrel-mods/squirrel.conf
Notes:
-> I will add more examples.
-> This project is beta.
-> This project works under only linux. (Now)