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

Money Give


Post New Thread Reply   
 
Thread Tools Display Modes
dineshrohra
Junior Member
Join Date: Aug 2012
Location: Dubai, United Arab Emira
Old 10-06-2012 , 18:32   Re: Money Give
Reply With Quote #21

Bump!

Anyone yet ?
dineshrohra is offline
yan1255
Senior Member
Join Date: Jul 2011
Old 05-05-2013 , 17:09   Re: Money Give
Reply With Quote #22

I've got no idea why but on my server this plugin worked like crap...
You can cheat the donate... by accident you can take money from player (I don't remember how)
I think someone should really change this plugin...
__________________
yan1255 is offline
staNioN
Junior Member
Join Date: Jul 2013
Old 07-31-2014 , 14:07   Re: Money Give
Reply With Quote #23

well,i got what i wanted , if someone wants it to here u go
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <colorchat>

#define DONATE_START_AMOUNT    1000
#define MAX_DONATE_AMOUNT    16000

new const szPrefix[] = "[staNioN-MM]"

new const g_szDonateCmds[][] = {
    
"/donate",
    
"donate",
    
"donate_money",
    
"/donate_money",
    
"money_donate",
    
"/money_donate"
};    

new 
g_iMenu[33];
new 
g_iDonateTo[33];
new 
g_iDonationAmount[33];

new 
g_pDonateIncreaseAmount;

stock CreateMenu(idszTitle[] = ""szHandler[])
{
    if(
g_iMenu[id])
    {
        
DestroyMenu(id);
    }
        
    return ( 
g_iMenu[id] = menu_create(szTitleszHandler) );
}

stock DestroyMenu(id)
{
    if(!
g_iMenu[id])
    {
        return;
    }
    
    
menu_destroy(g_iMenu[id]);
    
g_iMenu[id] = 0;
}

public 
plugin_init() 

    
register_plugin("MONEY-GIVE","1.05","+ARUKARI-"

    for(new 
iszCmd[60]; sizeof g_szDonateCmdsi++)
    {
        
formatex(szCmdcharsmax(szCmd), "say %s"g_szDonateCmds[i]);
        
register_clcmd(szCmd"cmdDonateMenu");
        
        
formatex(szCmdcharsmax(szCmd), "say_team %s"g_szDonateCmds[i]);
        
register_clcmd(szCmd"cmdDonateMenu");
    }
    
    
register_clcmd("Type""Donate_CmdCustomAmount");
    
g_pDonateIncreaseAmount register_cvar("donate_increase_money""1000");


public 
cmdDonateMenu(id,level,cid)
{    
    new 
iPlayers[32], iNum
    get_players
(iPlayersiNum"ch");
    
    if(
iNum == 1)
    {
        
ColorChat(idTEAM_COLOR"^4%s ^1You Cant ^3Donate ^1when You'r ^4Alone."szPrefix);
        return;
    }
    
    new 
szTitle[60]
    
formatex(szTitlecharsmax(szTitle), "\r%s \yDonate To:"szPrefix);
    
CreateMenu(idszTitle"Donate_ChoosePlayerHandler");
    
    for(new 
iszInfo[3], iPlayeriAccessszName[32]; iNumi++, iAccess 0)
    {
        if( ( 
iPlayer iPlayers[i] ) == id )
        {
            
iAccess = (1<<27);
        }
        
        
get_user_name(iPlayerszName31);
        
num_to_str(iPlayerszInfocharsmax(szInfo));
        
menu_additem(g_iMenu[id], szNameszInfoiAccess);
    }
    
    
menu_display(idg_iMenu[id]);
}  

public 
Donate_ChoosePlayerHandler(idmenuitem)
{
    if(
item 0)
    {
        
DestroyMenu(id);
        return;
    }
    
    new 
szInfo[3], iPlayerszDonateToName[32];
    
menu_item_getinfo(menuitemiPlayerszInfocharsmax(szInfo), szDonateToName31iPlayer);
    
    
g_iDonateTo[id] = ( iPlayer str_to_num(szInfo) );
    
DestroyMenu(id);
    
    new 
szTitle[60];
    
formatex(szTitlecharsmax(szTitle), "\r%s \yDonations"szPrefix);
    
    
CreateMenu(idszTitle"Donate_ChooseDonateOption");
    
    
formatex(szTitlecharsmax(szTitle), "\wDonate To: \y%s"szDonateToName);
    
menu_additem(g_iMenu[id], szTitle);
    
    
menu_additem(g_iMenu[id], "Type A Custom Amount");
    
    
formatex(szTitlecharsmax(szTitle), "Donation Amount: \y%d", ( g_iDonationAmount[id] = DONATE_START_AMOUNT ) );
    
menu_additem(g_iMenu[id], szTitle);
    
    
menu_display(idg_iMenu[id]);
}

public 
Donate_ChooseDonateOption(idmenuitem)
{
    if(
item 0)
    {
        
DestroyMenu(id);
        return;
    }
    
    
    
enum
    
{
        
ITEM_DONATE_TO,
        
ITEM_CUSTOM_AMOUNT,
        
ITEM_DONATION_AMOUNT
    
};
    
    switch(
item)
    {
        case 
ITEM_DONATE_TO:
        {
            
DestroyMenu(id);
            
DoDonate(id);
        }
        
        case 
ITEM_DONATION_AMOUNT:
        {
            if( ( 
g_iDonationAmount[id] += get_pcvar_num(g_pDonateIncreaseAmount) ) > MAX_DONATE_AMOUNT)
            {
                
g_iDonationAmount[id] = DONATE_START_AMOUNT
            
}
            
            new 
szNewName[60];
            
formatex(szNewNamecharsmax(szNewName), "Donation Amount: \y%d", ( g_iDonationAmount[id] ) )
            
menu_item_setname(menuitemszNewName);
            
            
menu_display(idmenu);
        }
        
        case 
ITEM_CUSTOM_AMOUNT:
        {
            
DestroyMenu(id);
            
            
client_cmd(id"messagemode ^"DonateTo^"");
            
ColorChat(idTEAM_COLOR"^4%s ^1Please type your ^4Amount ^1to give. It ^3MUST ^1be an ^3integer!"szPrefix);
        }
    }
}

public 
Donate_CmdCustomAmount(id)
{
    new 
szAmount[16];
    
read_argv(read_argc() - 1szAmountcharsmax(szAmount));
    
    if(!
is_str_num(szAmount))
    {
        
ColorChat(idTEAM_COLOR"^4%s ^1Invalid ^3Value!"szPrefix);
        return;
    }
    
    
g_iDonationAmount[id] = str_to_num(szAmount);
    
    if(
g_iDonationAmount[id] < 0)
    {
        
g_iDonationAmount[id] *= -1;
    }
        
    
DoDonate(id);
}

stock DoDonate(id)
{
    new 
iDonateTo g_iDonateTo[id];
    new 
iDonatedMoney g_iDonationAmount[id];
    
    if(!
is_user_connected(iDonateTo))
    {
        
ColorChat(idTEAM_COLOR"^4%s^1Player is no longer ^3Connected."szPrefix);
        return;
    }
    
    new 
iUserMoney cs_get_user_money(id);
    if(
iUserMoney iDonatedMoney)
    {
        
ColorChat(idTEAM_COLOR"^4%s ^1You Dont have ^3Enough Money ^1to ^4Donate."szPrefix);
        return;
    }
    
    
cs_set_user_money(idiUserMoney iDonatedMoney);
    
cs_set_user_money(iDonateTocs_get_user_money(iDonateTo) + iDonatedMoney);
    
    new 
szName1[32], szName2[32];
    
get_user_name(idszName131);
    
get_user_name(iDonateToszName231);
    
    
ColorChat(idTEAM_COLOR"^4%s ^3%s ^1You have just ^3donated $%d ^1to ^3%s."szPrefixiDonatedMoneyszName2);
    
ColorChat(0TEAM_COLOR"^4%s ^3%s ^1just ^3donated $%d ^1to ^3%s"szPrefixszName1iDonatedMoneyszName2);
    


Last edited by staNioN; 08-01-2014 at 23:23. Reason: got the requested plugin
staNioN is offline
Esbjergmus82
New Member
Join Date: Nov 2014
Old 01-09-2015 , 21:12   Re: Money Give
Reply With Quote #24

Donate.amxx
try (Master JG)
donate.amxx
Esbjergmus82 is offline
blackkky
Junior Member
Join Date: Feb 2015
Location: alrayyan, doha, qatar
Old 02-17-2015 , 09:39   Re: Give Money Cs1.6 Plugin
Reply With Quote #25

Hi this plugins edited by me [Blackkky]


- How to use :-

* just "say /donatemoney " in Cs1.6 Chat



Put the plugins here :-
cstrike\addons\amxmodx\plugins\donate_money.a mxx
cstrike\addons\amxmodx\scripting\donate_money .sma



Thanks For All
Attached Files
File Type: amxx donate_money.amxx (3.7 KB, 131 views)
File Type: sma Get Plugin or Get Source (donate_money.sma - 646 views - 4.8 KB)

Last edited by blackkky; 02-17-2015 at 09:41.
blackkky is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 03-20-2020 , 02:09   Re: Money Give
Reply With Quote #26

Ver. 2.00 Released.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 01-23-2022 , 18:59   Re: Money Give
Reply With Quote #27

Quote:
Originally Posted by +ARUKARI- View Post
Ver. 2.00 Released.
Might be missing something but i can't open the menu when writing /mg /mgive
Ark_Procession is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 01-23-2022 , 19:33   Re: Money Give
Reply With Quote #28

@Ark_Procession
Are you the only player connected to the game?
If there is no player that can be displayed in the menu, it will not be displayed.

The following cvar is useful if you want to try using Bot.
Code:
- amx_mgive_menu_enemies		// menu display in enemies. 0 = off, 1 = on.
- amx_mgive_menu_bots		// menu display in bots. 0 = off, 1 = on.
- amx_mgive_bots_action		// The bot gives money to those who have the least money. 0 = off, 1 = on.
In addition, v2.05 is now available on Github.
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 01-23-2022 at 19:35.
+ARUKARI- is offline
Reply


Thread Tools
Display Modes

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 11:28.


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