OciXCrom's Rank System

OciXCrom's Rank System v3.10

Нет прав для скачивания
Сообщения
3,361
Реакции
1,476
Помог
124 раз(а)
OciXCrom, спасибо за добавление этой возможности по моей просьбе.
 
Сообщения
15
Реакции
1
Возможно ли его поставить на сервер с пушками и что бы при убийстве с пушки или лазера опыт тоже считался?
 
Сообщения
3,361
Реакции
1,476
Помог
124 раз(а)
Fagor, возможно поставить куда угодно.
 
Сообщения
15
Реакции
1
sbelov020, спасибо. Буду пробывать просто я какой.то ставил но работало криво.
 
Сообщения
157
Реакции
279
Fagor, what did you exactly try and what was the problem?
 
Сообщения
3,361
Реакции
1,476
Помог
124 раз(а)
Fagor, в крайнем случае можно будет внести правки в плагины лазеров и тд, с использованием api ранг системы.
 
Сообщения
157
Реакции
279
Fagor, it's probably a problem with the plugin you're using - the guns and lasers you mentioned probably don't register the kill event properly. If you want, you can upload the plugin(s) you're using here and I'll make the necessary changes for you.
 
Последнее редактирование:
Сообщения
3,361
Реакции
1,476
Помог
124 раз(а)
OciXCrom, can you make different values of update player's exp in MySQL? Like in CsstatsxMySQL:
Код:
// How to update player stats in db
// -2 - on death and disconnect
// -1 - on round end and disconnect
// 0 - on disconnect
// higher than 0 - every n seconds and disconnect
// -
// Default: "-1"
csstats_sql_update "-2"
 
Сообщения
256
Реакции
12
OciXCrom
Curently I am using nvault.. But now if I Want to transfer to Mysql Will All the Database from nvault will be transfered to mysql ?
 
Сообщения
157
Реакции
279
pheronix
It won't and should not transfer automatically.

You can try using this this plugin I made a while ago. Have in mind that if the nVault file is big it can take a long time to transfer. It's not fully tested either.

C++:
#include <amxmodx>
#include <crxranks>
#include <nvault_util>
#include <sqlx>

#define PLUGIN_VERSION "1.0"

new g_szTable[32], Handle:g_iTuple

public plugin_init()
{
    register_plugin("CRXRanks: nVault to MySQL", PLUGIN_VERSION, "OciXCrom")
    register_cvar("CRXRanksTransfer", PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
    register_srvcmd("crxranks_nvault_to_mysql", "Cmd_Transfer")
}

public Cmd_Transfer()
{
    static bUsed

    if(bUsed)
    {
        server_print("Data has already been transfered once during this map. There's no point in transfering it again.")
        return PLUGIN_HANDLED
    }

    new szHost[32], szUser[32], szPassword[32], szDatabase[32]
    crxranks_get_setting("SQL_HOST", szHost, charsmax(szHost))
    crxranks_get_setting("SQL_USER", szUser, charsmax(szUser))
    crxranks_get_setting("SQL_PASSWORD", szPassword, charsmax(szPassword))
    crxranks_get_setting("SQL_DATABASE", szDatabase, charsmax(szDatabase))
    crxranks_get_setting("SQL_TABLE", g_szTable, charsmax(g_szTable))

    g_iTuple = SQL_MakeDbTuple(szHost, szUser, szPassword, szDatabase)

    new szVault[32]
    crxranks_get_setting("VAULT_NAME", szVault, charsmax(szVault))

    new iVault = nvault_util_open(szVault)
    nvault_util_readall(iVault, "OnVaultRead")
    nvault_util_close(iVault)
    bUsed = true

    return PLUGIN_HANDLED
}

public OnVaultRead(iCurrent, iNumEntries, szKey[], szValue[], iTimeStamp, iData, iSize)
{
    static szQuery[128]
    formatex(szQuery, charsmax(szQuery), "INSERT INTO %s (`Player`,`XP`,`Level`,`Next XP`,`Rank`,`Next Rank`) VALUES ('%s','%s','1','0','n/a','n/a');", g_szTable, szKey, szValue)
    SQL_ThreadQuery(g_iTuple, "QueryHandler", szQuery)
}

public QueryHandler(iFailState, Handle:iQuery, szError[], iErrorCode)
{
    if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
    {
        server_print(szError)
    }
}
The command is crxranks_nvault_to_mysql. It must be executed through the server's console (or rcon).

Minni
That code requires quite some editing + it doesn't even transfer to MySQL automatically.
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу