Raised This Month: $51 Target: $400
 12% 

Plugin coins (silver and gold)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AlexandruODT
Member
Join Date: May 2020
Old 12-01-2020 , 19:01   Plugin coins (silver and gold)
Reply With Quote #1

Hello !
Can anyone here create a plugin for me with silver and gold coins? A plugin to accumulate silver coins and you can convert them into gold coins.
What to do exactly:
Accumulate silver coins by:
-normal kills and headsot kills different coins
-time spent on the server (example for 10 minutes played on the server you get 5 coins)
Bomb Plant (Terrorist)
-Bomb blast (Terrorist)
-bomb detonation (CT's)
-by winning the round (ct's or t)
By accumulating these silver coins they can be transformed into gold coins and with these gold coins you can buy admin.
So you also need an admin purchase plugin with these coins (this plugin, when you use the / buyadmin command and buy that degree to be automatically added in users.ini like this: "Name" "password" "abcdefg" "a" - when you use the / command buyadmin and select the degree so you can choose a password.)

Orders :
/ scoins
/ goldcoins
amx_give_scoins - flag "u"
amx_give_goldcoins - flag "u"
Colorful messages when you receive these coins or when you use the orders

Who is willing to create this plugin to contact me:
Steam: CLICK HERE
Discord: Alexandru P. # 6985

I can provide more details in private.

I will pay for this plugin.

Last edited by AlexandruODT; 12-01-2020 at 19:16.
AlexandruODT is offline
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 12-03-2020 , 05:31   Re: Plugin coins (silver and gold)
Reply With Quote #2

Hello. I have The Coin System But is not like you want. You can share sma and request to edit it.
Here:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Coins System"
#define VERSION "1.0"
#define AUTHOR "6u3oH"

#define CLASSNAME_DEFAULT "info_null"
#define CLASSNAME_SET "info_coin"
#define PATH_DATABASE "addons/amxmodx/data/coins_system.dat"
#define COIN_MODEL "models/coin/coin.mdl"
#define COIN_SOUND "coin/coin.wav"

#define PDATA_KILLHEAD_OFFSET 75
#define PDATA_KILLGREN_OFFSET 76
#define PDATA_PLAYER_OFFSET 5

/*----------------------------------------------------------
 ------------------------ Настройки ------------------------
 ---------------------------------------------------------*/

#define VIP_FLAG ADMIN_LEVEL_H

#define COIN_GIVE_KILL 2 // Сколько монет давать за простое убийство
#define COIN_GIVE_KILL_HEAD 3 // Сколько монет давать за убийство в голову
#define COIN_GIVE_KILL_KNIFE 5 // Сколько монет давать за убийство ножом
#define COIN_GIVE_KILL_GRENADE 6 // Сколько монет давать за убийство гранатой

#define COIN_DROP_COINS // Закоментируйте строку, чтобы монеты с игрока не выпадали
#define COIN_NUM_DROPKILL_MIN 1 // Минимальное кол-во монет, выпадающих при смерти игрока
#define COIN_NUM_DROPKILL_MAX 3 // Максимальное кол-во монет, выпадающих при смерти игрока

#define COIN_TIME_REMOVE 30 // Через сколько секунд удаляются выпавшие монеты (закоментриуйте, чтобы удалялись только в конце раунда)

/*----------------------------------------------------------
 ------------------------ Настройки ------------------------
 ---------------------------------------------------------*/

new g_iMaxPlayers;
new 
g_iCoin[33];

public 
plugin_precache()
{
    
precache_model(COIN_MODEL);
    
precache_sound(COIN_SOUND);
}

public 
plugin_cfg() write_file(PATH_DATABASE"[База данных] [Coins System]"0);
public 
client_connect(idload_coins(id);
public 
client_disconnected(idsave_coins(id);

public 
plugin_natives()
{
    
register_native("get_user_coins""get_user_coins"true)
    
register_native("set_user_coins""set_user_coins"true)
}

public 
get_user_coins(id) return g_iCoin[id];
public 
set_user_coins(idiNumg_iCoin[id] = iNum;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
#if defined COIN_DROP_COINS
    
RegisterHam(Ham_Killed"player""fw_KilledPlayerPost"true);
    
#endif
    
RegisterHam(Ham_TouchCLASSNAME_DEFAULT"fw_TouchCoinPost"true);
    
#if defined COIN_TIME_REMOVE
    
RegisterHam(Ham_ThinkCLASSNAME_DEFAULT"fw_ThinkCoinPost"true);
    
#endif
    
    
register_logevent("event_RoundEnd"2"1=Round_End");

    
g_iMaxPlayers get_maxplayers();
    
set_task(2.0"Task_HudMsg", .flags "b");
}

#if defined COIN_DROP_COINS
public fw_KilledPlayerPost(iVictimiAttackeriCorpse)
{
    if(!
is_user_connected(iVictim))
        return;
        
    if(
g_iCoin[iVictim] > 0)
    {
        new 
FloatfOrigin[3], FloatfVelocity[3];
        
pev(iVictimpev_originfOrigin);
        
        new 
iRandom random_num(COIN_NUM_DROPKILL_MINCOIN_NUM_DROPKILL_MAX);
        
        for(new 
i<= iRandomi++)
        {
            if(!
g_iCoin[iVictim])
                return;
            
            new 
iEnt engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringCLASSNAME_DEFAULT));
            
            
set_pev(iEntpev_classnameCLASSNAME_SET);
            
set_pev(iEntpev_originfOrigin);
            
set_pev(iEntpev_solidSOLID_TRIGGER);
            
set_pev(iEntpev_movetypeMOVETYPE_BOUNCE);
            
            
engfunc(EngFunc_SetSizeiEntFloat: {-10.0, -10.0, -10.0}, Float: {10.010.010.0});
            
engfunc(EngFunc_SetModeliEntCOIN_MODEL);
            
            
fVelocity[0] = random_float(10.050.0);
            
fVelocity[1] = random_float(10.050.0);
            
fVelocity[2] = random_float(100.0150.0);
        
            
set_pev(iEntpev_velocityfVelocity);
            
            
#if defined COIN_TIME_REMOVE
            
set_pev(iEntpev_nextthinkget_gametime() + COIN_TIME_REMOVE);
            
#endif
        
}
    }
        
    if(!
is_user_connected(iAttacker))
        return;
    
    if(
iVictim == iAttacker)
        return;
    
    new 
iGiveCoin g_iCoin[iAttacker];
    
    if(
get_pdata_int(iVictimPDATA_KILLGREN_OFFSET) & DMG_GRENADE)
        
g_iCoin[iAttacker] += COIN_GIVE_KILL_GRENADE;
    else if(
iAttacker == pev(iVictimpev_dmg_inflictor) && get_user_weapon(iAttacker) == CSW_KNIFE)
        
g_iCoin[iAttacker] += COIN_GIVE_KILL_KNIFE;
    else if(
get_pdata_int(iVictimPDATA_KILLHEAD_OFFSETPDATA_PLAYER_OFFSET) == HIT_HEAD)
        
g_iCoin[iAttacker] += COIN_GIVE_KILL_HEAD;
    else
        
g_iCoin[iAttacker] += COIN_GIVE_KILL;
        
    if(
get_user_flags(iAttacker) & VIP_FLAG)
        
g_iCoin[iAttacker] *= 2;
        
    
iGiveCoin g_iCoin[iAttacker] - iGiveCoin;
        
    
set_hudmessage(02550, -1.00.2600.12.00.10.13);
    
show_hudmessage(iAttacker"+%i монет"iGiveCoin);
}

public 
fw_TouchCoinPost(iEntid)
{
    if(!
pev_valid(iEnt) || !is_user_alive(id))
        return;
            
    static 
sClassName[32];
    
pev(iEntpev_classnamesClassNamecharsmax(sClassName));
        
    if(!
equal(sClassNameCLASSNAME_SET))
        return;
        
    
g_iCoin[id]++;
    
emit_sound(idCHAN_WEAPONCOIN_SOUNDVOL_NORMATTN_NORM0PITCH_NORM);
    
    
set_pev(iEntpev_flagspev(iEntpev_flags) | FL_KILLME);
}
#endif

#if defined COIN_TIME_REMOVE
public fw_ThinkCoinPost(iEnt)
{
    if(!
pev_valid(iEnt))
        return;
        
    static 
sClassName[32];
    
pev(iEntpev_classnamesClassNamecharsmax(sClassName));
    
    if(!
equal(sClassNameCLASSNAME_SET))
        return;
        
    
set_pev(iEntpev_flagspev(iEntpev_flags) | FL_KILLME);
}
#endif

public event_RoundEnd()
{
    new 
iEnt FM_NULLENT;
    
    while((
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname"CLASSNAME_SET)))
        if(
pev_valid(iEnt))
            
set_pev(iEntpev_flagspev(iEntpev_flags) | FL_KILLME);
}

public 
Task_HudMsg()
{
    
set_hudmessage(2002002000.010.9000.11.00.10.14);
    
    for(new 
id 1id g_iMaxPlayersid++)
    {
        if(!
is_user_alive(id))
            continue;
        
        
show_hudmessage(id"Ваши монеты: %i"g_iCoin[id]);
    }
}

public 
load_coins(id)
{
    new 
iLine 1iLensData[64], sKey[38], sAuthID[38];
    
get_user_authid(idsAuthIDcharsmax(sAuthID));
    
    while((
iLine read_file(PATH_DATABASEiLinesDatacharsmax(sData), iLen)))
    {
        
parse(sDatasKey37);
        
        if(
equal(sKeysAuthID))
        {
            
parse(sDatasKey37sKey37);
            
g_iCoin[id] = str_to_num(sKey);
            
            return;
        }
    }
    
    
g_iCoin[id] = 0;
}

public 
save_coins(id)
{
    new 
iLine 1iLensData[64], sKey[38], sAuthID[38];
    
get_user_authid(idsAuthIDcharsmax(sAuthID));
    
    while((
iLine read_file(PATH_DATABASEiLinesDatacharsmax(sData), iLen)))
    {
        
parse(sDatasKey37);
        
        if(
equal(sKeysAuthID))
        {
            
format(sDatacharsmax(sData), "%s %i"sAuthIDg_iCoin[id]);
            
write_file(PATH_DATABASEsDataiLine-1);
            
            return;
        }
    }
    
    
format(sDatacharsmax(sData), "%s %i"sAuthIDg_iCoin[id]);
    
write_file(PATH_DATABASEsData, -1);

ho83 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode