Регулировка выдачи денег

666FoX666

Участник
Сообщения
702
Реакции
211
Здравствуйте! Хотел узнать по поводу регулировки "выдачи денег". То есть изменения стандартных значений выдачи денег за: убийство, разминирование бомбы, победу в раунде, и т.п. В CS:GO эту муть можно через конфиг редактировать, а в CSS так можно. Если да, то можно сайтик, или любой другой ресурс откуда можно почерпать квары и их описание. Вроде @Hejter кидал нечто подобное, но я потерял.

Заранее спасибо!
 

Hejter

xor ebx, ebx
Сообщения
1,759
Реакции
393
@666FoX666, Drop money

Иногда использую эту библиотеку
C-подобный:
/*
* File: money.inc
* Description: Account management function for player (Counter-Strike: Source only)
* Author(s): duxa
*/
#if defined _money_included
#endinput
#endif
#define _money_included
new g_iAccount = -1;
/*
* Get the amount of the player's account.
*
* @param client Client index
* @return   Amount of the player's account
*/
stock GetMoney(client)
{
    g_iAccount = FindSendPropOffs("CCSPlayer", "m_iAccount");
    if (g_iAccount == -1) return -1;

    return GetEntData(client, g_iAccount, 4);
}
/*
* Set the amount of the player's account.
*
* @param client Client index
* @param amount Amount of the player's account
* @noreturn
*/
stock SetMoney(client, amount)
{
    g_iAccount = FindSendPropOffs("CCSPlayer", "m_iAccount");
    if (g_iAccount == -1) return;

    if (amount > 16000) amount = 16000;
    if (amount < 0) amount = 0;

    SetEntData(client, g_iAccount, amount, 4, true);
}
/*
* Reset the amount of the player's account.
*
* @param client Client index
* @noreturn
*/
stock ResetMoney(client)
{
    g_iAccount = FindSendPropOffs("CCSPlayer", "m_iAccount");
    if (g_iAccount == -1) return;

    SetEntData(client, g_iAccount, 0, 4, true);
}
/*
* Add the amount of the player's account.
*
* @param client Client index
* @param amount Amount that add to the player's account
* @noreturn
*/
stock GiveMoney(client, amount)
{
    g_iAccount = FindSendPropOffs("CCSPlayer", "m_iAccount");
    if (g_iAccount == -1) return;

    new Money;
    new Get = GetMoney(client);
    if(Get == -1) return;

    if (amount > 16000) amount = 16000;
    if (amount < 0) amount = 0;

    Money = Get + amount;

    if(Money > 16000) Money = 16000;

    SetEntData(client, g_iAccount, Money, 4, true);
}
/*
* Take the amount of the player's account.
*
* @param client Client index
* @param amount Amount that take to the player's account
* @noreturn
*/
stock TakeMoney(client, amount)
{
    g_iAccount = FindSendPropOffs("CCSPlayer", "m_iAccount");
    if (g_iAccount == -1) return;

    new Money;
    new Get = GetMoney(client);
    if(Get == -1) return;

    if (amount < 0) amount = 0;

    Money = Get - amount;

    if(Money < 0) Money = 0;

    SetEntData(client, g_iAccount, Money, 4, true);
}
 
Сверху Снизу