AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Team' s fund (https://forums.alliedmods.net/showthread.php?t=47311)

Ryu2877 11-14-2006 22:25

Team' s fund
 
2 Attachment(s)
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.

SweatyBanana 11-14-2006 22:34

Re: Team' s fund
 
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.

Ryu2877 11-14-2006 22:50

Re: Team' s fund
 
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...

jopmako 11-15-2006 10:32

Re: Team' s fund
 
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.

Ryu2877 11-16-2006 06:43

Re: Team' s fund
 
Quote:

Originally Posted by jopmako (Post 403483)
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.

jopmako 11-16-2006 07:55

Re: Team' s fund
 
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)
  //...
}


Hawk552 12-26-2006 13:48

Re: Team' s fund
 
Looks alright, although it could be better. I'm guessing it works based on the above posts, so I'll approve it.

theveteran 07-29-2007 05:45

Re: Team' s fund
 
hi, is this the plugin so u can have over 16 000$ in game? how u install it?

cs1.6 12-30-2007 16:23

Re: Team' s fund
 
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?


All times are GMT -4. The time now is 19:53.

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