[Include] (LCI) Achievements System
#1


What is this include?

This include is the LCI Achievements System, developed by the Lawedan Software Development Team for
Lawedan Roleplay, which was released for the San Andreas Multiplayer Community.
This simple, yet useful, project combines textdraws and stocks to create a Achievements System.

This include was originally developed by Magnus Burton (Flyfishes), one of the PAWN Developers for our project, Lawedan Roleplay, but later, we think it's a good contribution to release it. (Take time to read, he is our PAWN developer, therefore, yes, before you reply, we have permission to release this)

We believe this is a great way to contribute to beginner and advanced PAWN developers, as this is a great tool for any kind of server.

How can this be useful?

This simple include can be used in any kind of server.
We can use the example of a deathmatch server, you can recieve achievements like 'First Kill!', '100 Kills!', 'My first house', and several other cases. Roleplay servers, you can have achievements like 'Muderer!', 'Arrested', 'Bad Guy', and several other cases. And the list applies to a long list of different types of gamemodes.


Installation

Installing this include is very simple.
You can download it from pastebin. Place it at the pawno>includes folder.

Then, on your gamemode / filterscript, add this at the top:
pawn Код:
#include <achievements>
And OnGameModeInit:
pawn Код:
public OnGameModeInit()
{
        achievements_OnGameModeInit();
}
Then, you are ready to start adding achievements!

So how does this work?

We have made this as simple as possible, therefore, our current function(s) include:
pawn Код:
/*
ShowPlayerAchievement(playerid, short[], title[], text[], fadeout);
-playerid: The playerid to show the achievement to.
-short[]: Under construction
-title[]: The title of the achievement
-text[]: The content of the achievement
-fadeout: (milliseconds) how long will the timer stay on the screen?
*/

ShowPlayerAchievement(playerid, short[], title[], text[], fadeout);
/*
SetAchievementColor(box, color);
:Sets the achievement color - YOU NEED TO USE IT >AFTER< ShowPlayerAchievement!
-box: 0 Description Box and 1 New Achievement Box.
*/

native SetAchievementColor(box, color);
License

The current license we use is the Mozilla Public License...

pawn Код:
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is the Lawedan Computers, Inc Achievements System.
 *
 * The Initial Developer of the Original Code is
 * Magnus Burton (Flyfishes), Zack Moshonas (Hal) and Matthew Striker (Deskoft).
 * Portions created by the Initial Developer are Copyright © 2011
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Adam Booth
 * Jamie Morrison
 * Robin Strumberg
 * Loyd Rafolds
 * All the Lawedan Team!
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */
Our quick commands
When I'm about to use a include, the first thing I want to do is check how it works, I usually use a simple command to do this.
So here we have the quick commands, developed using ZCMD, by Hal (one of our developers).
(Thanks to Hal)

pawn Код:
CMD:ach1(playerid, params[])
{
    //ShowPlayerAchievement(playerid, title[], text[], fadeout)
    ShowPlayerAchievement(playerid, "Your first achievement!", "Congrats, you have just done your first achievement!", 5000);
    return 1;
}
   
CMD:ach2(playerid, params[])
{
    //ShowPlayerAchievement(playerid, title[], text[], fadeout)
    ShowPlayerAchievement(playerid, "You have killed someone!", "Congrats, you have just killed someone! Be proud!", 5000);
    return 1;
}
   
CMD:ach3(playerid, params[])
{
    //ShowPlayerAchievement(playerid, title[], text[], fadeout)
    ShowPlayerAchievement(playerid, "Your first house!", "You have just bought a house, congrats! Don't forget to clean your room!", 5000);
    return 1;
}
Screenshot

Here's the screenshot. (Yes, it's a blank script).


Upcoming Features

For the release 2 we have planned the following features:
  • Saving Achievements (and detecting if a player has the achievement)


Please donate to keep us up! Contact me for donation information...
Reply


Messages In This Thread
(LCI) Achievements System - by Deskoft - 16.08.2011, 02:29
Re: (LCI) Achievements System - by Hal - 16.08.2011, 02:32
Re: (LCI) Achievements System - by Scenario - 16.08.2011, 02:41
Re: (LCI) Achievements System - by Deskoft - 16.08.2011, 02:49
Re: (LCI) Achievements System - by Retardedwolf - 16.08.2011, 03:14
Re: (LCI) Achievements System - by Deskoft - 16.08.2011, 03:20
Re: (LCI) Achievements System - by Lorenc_ - 16.08.2011, 05:39
Re: (LCI) Achievements System - by BuLLeT[LTU] - 16.08.2011, 06:39
Re: (LCI) Achievements System - by Gertin - 16.08.2011, 06:50
Re: (LCI) Achievements System - by Flyfishes - 16.08.2011, 07:58
Re: (LCI) Achievements System - by Deskoft - 16.08.2011, 20:23
Re: (LCI) Achievements System - by Michael@Belgium - 16.08.2011, 20:34
Re: (LCI) Achievements System - by LZLo - 16.08.2011, 21:09
Re: (LCI) Achievements System - by Hiddos - 16.08.2011, 21:49
Re: (LCI) Achievements System - by Deskoft - 16.08.2011, 21:57
Re: (LCI) Achievements System - by fie - 16.08.2011, 22:27
Re: (LCI) Achievements System - by [L3th4l] - 16.08.2011, 22:38
Re: (LCI) Achievements System - by Deskoft - 16.08.2011, 22:41
Re: (LCI) Achievements System - by royal_king - 18.08.2011, 14:58
Re: (LCI) Achievements System - by Deskoft - 19.08.2011, 20:36
Re: (LCI) Achievements System - by Deskoft - 29.12.2011, 16:08
Respuesta: (LCI) Achievements System - by [Nikk] - 29.12.2011, 16:58
Re: (LCI) Achievements System - by Littlehelper - 29.12.2011, 17:02
Re: (LCI) Achievements System - by HyperZ - 29.12.2011, 17:09
Re: (LCI) Achievements System - by Danyal - 29.12.2011, 17:15
Re: (LCI) Achievements System - by Hal - 29.12.2011, 18:32
Re: (LCI) Achievements System - by Deskoft - 29.12.2011, 21:12
Re: (LCI) Achievements System - by seanny - 29.12.2011, 21:43
Re: (LCI) Achievements System - by TheArcher - 30.12.2011, 00:01
Re: (LCI) Achievements System - by Deskoft - 30.12.2011, 14:56
Re: (LCI) Achievements System - by Deskoft - 26.01.2012, 02:02
Re: (LCI) Achievements System - by geerdinho8 - 26.01.2012, 10:17
Re: (LCI) Achievements System - by hossa - 26.01.2012, 14:15
Re: (LCI) Achievements System - by geerdinho8 - 27.01.2012, 17:28

Forum Jump:


Users browsing this thread: 4 Guest(s)