Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

AchievementsGO - easy-to-use developer tool for creating your own Achievements


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description

It's a really easy-to-use plugin, which allows to create your own Achievements. Everything is based on SQLite and created in a very intuitive way.
All you have to do is upload it on the server and try to create some achievements on your own :)

Commands

Code:

!ac - opens engine's main menu

Example:
Code:

#include <sourcemod>
#include <AchievementsGO>
 
int AGO_Bomb;
 
public OnPluginStart()
{
        HookEvent("bomb_planted", Event_BombPlanted);
}
 
public void AGO_OnRegisterAchievements()
{
        AGO_Bomb = AGO_AddAchievement("Boom!", "Plant 5 bombs", "Pyro path", 5);
}
 
public Action Event_BombPlanted(Handle event, const char[] name, bool dontBroadcast)
{
        int attackerId = GetClientOfUserId(GetEventInt(event, "userid"));
       
        AGO_AddPoint(attackerId, AGO_Bomb);
}

The only requirement for creating Achievement is one native - AGO_AddAchievement. We pass respectively: Name of achievement, its description, catalog and value - that's it.

Achievement can be put on 'folders' - just give catalog's name in the 3rd argument. In game, catalog is marked by sign '>'. If we don't want our achievement in any folder, just leave this argument blank ("")
After you're done, just update a given achievement's status (ie add points), using for example: AGO_AddPoint

Plugin has a lot of natives and forwards to make your development even simpler:
https://github.com/MAGNET1/SourceMod...evementsGO.inc

The accomplished achievement information is shown in HintText and in the chat (chat: all the players)

Screens:
68747470733a2f2f676f2d636f64652e706c2f75

68747470733a2f2f676f2d636f64652e706c2f75

68747470733a2f2f676f2d636f64652e706c2f75

Download

https://github.com/MAGNET1/SourceMod

or attachment:

Attached Files
File Type: zip AchievementsGO.zip (96.5 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...