Raised This Month: $114 Target: $400
 28% 

Team' s fund


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands        Approver:   Hawk552 (427)
Ryu2877
Member
Join Date: Sep 2006
Location: China
Old 11-14-2006 , 23:25   Team' s fund
Reply With Quote #1

Hello everyone!
This is a simple plugin for sharing margin money to teammate.
*1.Levy upon tax from players whose money more than LEVYPOINT by cess.
*2.Imburse players whose money less than BASEMONEY.
*3.This plugin is applicable for the server which using unlimited money.
-----------------------------------------------------------------
amxx.cfg custom(if you has not define,default mount will use):
//custom for imburse player whose money less than the BASEMONEY
Fund_BASEMONEY 5000
//custom each team's max fund
Fund_MAXFUND 100000
//custom the levy up point
Fund_LEVYPOINT 10000
//custom base cess
//player's cess = player's money / LEVYPOINT * BASECESS
Fund_BASECESS 10
//custom highest cess
Fund_MAXCESS 90
------------------------------------------------------------------
I'm a tyro for amxx,please enlighten more,thanks very much!
Sorry for my bad English.
Attached Thumbnails
Click image for larger version

Name:	Fund.jpg
Views:	6933
Size:	95.7 KB
ID:	11956  
Attached Files
File Type: sma Get Plugin or Get Source (Ryu_Fund.sma - 2378 views - 4.6 KB)

Last edited by Ryu2877; 11-18-2006 at 03:07.
Ryu2877 is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 11-14-2006 , 23:34   Re: Team' s fund
Reply With Quote #2

You can remove:

PHP Code:
public plugin_modules()
{
    
require_module("amxmodx")
    
require_module("amxmisc")
    
require_module("cstrike")

Why do you have all of these?

PHP Code:
cvar_exists("Fund_MAXFUND"
You created the cvar within the plugin..It has to exist.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Ryu2877
Member
Join Date: Sep 2006
Location: China
Old 11-14-2006 , 23:50   Re: Team' s fund
Reply With Quote #3

Thanks SweatyBanana.I'll amend it.
I put these "if" just to prevent people custom some illogical parameter,
example:
BASEMONEY > MAXFUND or BASEMONEY > LEVYPOINT etc.
But I don't know other method...
Ryu2877 is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 11-15-2006 , 11:32   Re: Team' s fund
Reply With Quote #4

hmm 'good ideal' I alway hear it before you know.

but I have question.
Code:
new Float:cessX = Float:float(idMoney) / Float:float(LEVYPOINT)
 
Is this the same?
new Float:cessX = float(idMoney) / float(LEVYPOINT)

how about register a native call instead below:
Code:
callfunc_begin("gv_get_money", "Ryu_Money.amxx")
callfunc_push_int(id)
 
and
 
if ( is_plugin_loaded("Ryu_Money") > 0 )
   server_cmd("gv_augment_money %d %d 0", id, -TaxMoney)
Added:
I have other ideal:
How about execute "Show_Fund_Task" between roundend and buytime is over that can free the finite HUD channel I think.
__________________
QQ31537639

Last edited by jopmako; 11-15-2006 at 11:48.
jopmako is offline
Send a message via MSN to jopmako
Ryu2877
Member
Join Date: Sep 2006
Location: China
Old 11-16-2006 , 07:43   Re: Team' s fund
Reply With Quote #5

Quote:
Originally Posted by jopmako View Post
Added:
I have other ideal:
How about execute "Show_Fund_Task" between roundend and buytime is over that can free the finite HUD channel I think.
Yeah! It's a good idea! And just remove the "task" at "plugin_init" will achieve it:

PHP Code:
public plugin_init()
{
 ......
 
//set_task(15.0, "Show_Fund_Task", 7412369, "", 0, "b")
}
......
/*public Show_Fund_Task()
{
 Show_Fund()
}*/ 
And about the function joint, I put certain code in my unlimit money plugin which like underside.This allows Admin to augment(or reduce -- if you pass a negative) player's money, of course it can been use in other plugin.
PHP Code:
public plugin_init()
{
 ...... 
 
register_srvcmd("gv_augment_money""Hook_Command")

Another is the same but then use "public" to get player's unlimit money and return it.
I think the two methods are cheap, but as you know, I can't find better idea by my current level.
Ryu2877 is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 11-16-2006 , 08:55   Re: Team' s fund
Reply With Quote #6

try this out.
registe native in your unlimit money plugin

Code:
public plugin_natives()
{
   register_native("gv_get_money", "get_money",1)
   // ...
}
 
public get_money(id)
{
   //...
   return $$
}
in other plugin define this
Code:
native gv_get_money(id)
 
// test
get_player_money(id)
{
   new money = gv_get_money(id)
   //...
}
__________________
QQ31537639

Last edited by jopmako; 11-16-2006 at 09:03.
jopmako is offline
Send a message via MSN to jopmako
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-26-2006 , 14:48   Re: Team' s fund
Reply With Quote #7

Looks alright, although it could be better. I'm guessing it works based on the above posts, so I'll approve it.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
theveteran
Junior Member
Join Date: Jul 2007
Old 07-29-2007 , 06:45   Re: Team' s fund
Reply With Quote #8

hi, is this the plugin so u can have over 16 000$ in game? how u install it?
theveteran is offline
cs1.6
Senior Member
Join Date: Dec 2006
Old 12-30-2007 , 17:23   Re: Team' s fund
Reply With Quote #9

I don't know.. i tried this a while ago but it did'nt really work. Does this need the unlimited plugin to be installed, too? And if yes, which one?
cs1.6 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:59.


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