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

[ANY] Player Reputations v1.0.0


owner_2019
 Udostępnij

Rekomendowane odpowiedzi

[ANY] Player Reputations

v1.0.0

Description:

This plugin allows players to rate each other creating a system of reputation.
Originally meant to be used as a reputation system for trade servers to show who are regular sellers/buyers.
I decided to release this because I haven't done much in terms of public plugins so I want to release some stuff and more are coming soon :)

Hasn't really had extensive testing so any bug testers are welcome and appreciated.

Been working on a custom web page to display reputations and I'll most likely release that later if there is a want for one.
Meanwhile: http://arcticgaming.net/forums/reputations.php

Commands:
  • sm_rep <client> - Displays a client's reputation
  • sm_updaterep <client> [amount] <reason> - Updates a reputation to a client
  • sm_addrep <client> [amount] <reason> - Adds reputation to a client

Admin Commands:
  • sm_clearrep <client> - Clears a client's reputation (Root Admin by default)

Cvars:
  • sm_can_multiple_rep (0) - If enabled (1) then users are allowed to give multiple ratings to the same user
  • sm_can_update_rep (1) - If enabled (1) then users are allowed to update previous ratings to a user (Only works with sm_can_multiple_rep set to 0)
  • sm_min_rep (-10) - Lowest rating amount a player can give (Must be lower than sm_max_rep)
  • sm_max_rep (10) - Highest rating amount a player can give (Must be higher than sm_min_rep)
  • sm_chat_prefix (1) - If enabled (1) then a chat prefix will be shown with rep amount (Will change method later)
  • sm_connect_announce (1) - If enabled (1) then an announcement with rep amount will be shown on client connect
  • sm_rep_reasons (1) - If enabled (1) then reasons can be used in ratings

API:

Not much for now but you can grab a player's reputation count
Code:

/**
 * Gets a client's reputation
 *
 * @param client                Client index.
 * @return                                Returns reputation amount
 *
 * @error                                Invalid client
 */
native Reputation_GetRep(int client);

Installation:

This plugin requires a MySQL database. It will look for a configuration named "reputation". Example:
Code:

    "reputation"
    {
        "driver"            "mysql"
        "host"                "example.com"
        "database"            "example_database"
        "user"                "exampleuser"
        "pass"                "examplepassword"
        //"timeout"            "0"
        "port"                "3306"
    }

Changelog:

Code:

v1.0.0 - Initial Release
Credits:

Mathiaas - Bug Testing
August- Annoying me non-stop
Anyone I forgot I am sorry, please let me now

Download:

Attached Files
File Type: inc reputation.inc (275 Bytes)
File Type: inc colors_csgo.inc (15.5 KB)
File Type: sp Get Plugin or Get Source (reputation.sp - 17.3 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ę...