AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Money All-in-One (update 3.3) (https://forums.alliedmods.net/showthread.php?t=80629)

[email protected] 11-17-2008 09:15

Money All-in-One (update 3.3)
 
4 Attachment(s)
Plugin name: Money All-in-One
Version: 3.3
Author: [email protected]


.: Description :.

- Money can over 16000, and will not change any server cvars e.g. mp_startmoney.
- Have no error when sv_restart or sv_restartround and join team from spectator.
- Reward or not when bomb planted, explode, defused.
- Reward or not knife kill, headshot, grenade kill.
- Reward or not first, second, third killer in a round.
- Admin can give money to any player, team or all by menu or type command in console.
- Color chat info show.
- Multilanguage and will not mixed up.
- For Counter-Strike 1.6 mod only

- 3.2beta add: More compatibility with other plugins, but I'm not sure 100%. That's meaning you do not need to recompile the other plugins. (Just pay attention to the money value change of other plugins: not more than 10K if negative, not more than 6K if positive.)

- 3.2beta add: Money transfer through menu. Anyone can give money to any player, if you are Admin you money will keep, else you money will subtract what you give out.

-3.3 add: can control display chat message or not through cvar, see Cvar & Default value section.



.: Request :.

- modules:
cstrike_amxx.dll
csx_amxx.dll
fakemeta_amxx.dll

I wrote this plugin use AMXx Studio 1.4.3final under AMXX1.8.1. So, all you needs is full version of AMXMODX 1.8.1.
I am not sure it could run properly at old version of AMXMODX. If any question was appeared, update to 1.8.1 first.



.: Cvars & default value :.

( What many cvars! I consider put them in a .ini file, maybe next version. :D )

Amx_startmoney 800 //Fully instead of mp_startmoney.

Amx_maxmoney 30000 // Max money player can have.

The format of 9 cvars below is: cvarname "<0|Bonus> <0|1>"(1st argument is bouns amount, set 0 to disable; 2nd argument control show chat msg or not, put nothing=1)
**NOTICE**
1. If set 2 arguments, double quotation is needed, even in console
2. DO NOT put too much blank between the two arguments, otherwise something bad will happen :D
**********
Amx_bonus_planter "500 1" // Bonus for C4 planter.
Amx_bonus_explode "500 1" // Bonus for the planter when C4 was exploded.
Amx_bonus_defuser "1000 1" // Bonus for who defused C4 bomb.
Amx_bonus_headshot "200 1" // Bonus for player who headshot someone.
Amx_bonus_o4killer "200 1" // Bonus for player who killed someone by grenade.
Amx_bonus_9fkiller "5000 1" // Bonus for player who killed someone by knife.
Amx_bonus_1stkiller "1000 1" // Bonus for the first killer in a round. Set 0 to disable as well as tow cvars followed.
Amx_bonus_2ndkiller "500 1" // Bonus for the second killer in a round.
Amx_bonus_3rdkiller "300 1" // Bonus for the third killer in a round.

Amx_servertag "" // A tag displayed at the head of color message, Need restart to enable change.

Amx_setgmnum 200 500 1000 2000 5000 10000 // See command explaination



.: Commands and Usage :.


amx_moneymenu
// Display Give Money to Player Menu. It will show 7 players on each page. Player's money display behind their name also. Key 1 to 7 corresponding to players, press the key will add the player’s money. Press Key 8 will change the amount of money add to player. Key 9 for next page, key 0 for back or exit.

amx_setgmnum <amount1> [amount2] [amount3] …
// Set the menu’s option amount. Default value is : amx_setgmnum 500 1000 2000 5000 10000. This command can put in amxx.cfg as cvars.

amx_givemoney <target> <amount>
// Command in console give player money, <target> should be player name, or put a ‘@’ as prefix to group player, e.g. @CT, @T, @all. I’ve no idea about @[clanname], maybe next version…



.: Files and Installation :.

Files and location:
addons\amxmodx\plugins\Money_aio_3.3.amxx (if doesn't work, rename it.)
addons\amxmodx\data\lang\Money_aio.txt

- Copy the files to the dir give above, put the plugin's file name at a new line in plugins.ini.

- Make sure uncomment cstrike and csx in modules.ini file.

- Copy the content of section “Cvars & default value” above and paste them to you amxx.cfg and modify the value as you wish.

OK, start or restart the server and enjoy it! (:



.: Translation :.

- en ; thanks crazyeffect.
- nl ; thanks crazyeffect again.
- es ; thanks benamo6.
- fr ; thanks arkshine.
- lt ; thanks hleV.
- de ; thanks Mordekay, crazyeffect and pavi
- pl ; thanks BeAfraid and B3N4K
- ro ; thanks rekull
- ru ; thanks mozart123
- tc ; thanks yjchen
- cn ;do myself. also thanks, hehe :D

translation thread: http://forums.alliedmods.net/showthread.php?t=80713

.: Credit :.

- PLA clan’s boss Feng Chen and TC clan’s OP Gray, allowed me test my plugin on their server.
- Cv.R, RedRoSe, PaoHui, lance<13>, SmallWhite help me to test or to provide useful information.




.: Notice :.

- Nothing is perfect. The money on HUD will not flash when player killed someone normal (it should flash +300) or give “salary” on new round, but bonus will.

- I still used a fakemeta function in 3.3, I'm afraid that it will comsume too much CPUs. If it cannot to tolerate, give up it, use previous version. I am sorry.

- I tested 3.3 with amx_bank.amxx. I found that the max money I can deposit is 10K, withdraw is 6K. BUT the money amout is absolutely correct! That's meaning if you want deposit 20K, you need operate 2 times; withdraw 20K need operate 4 times( 2K at last time). It is seemly BANK become ATM.......haha:D

hleV 11-17-2008 10:56

Re: Money All-in-One
 
Will check it out.

BTW shouldn't CVAR amx_bonus_3ndkiller be amx_bonus_3rdkiller?

crazyeffect 11-17-2008 11:46

Re: Money All-in-One
 
Dutch translation:

Quote:

[nl]
HEAD_SHOT = %s heeft een vijand in het hoofd geschoten! Hij krijgt %s$ bonus!
GRENADE_KILL = %s dood een vijand met een granaat! Hij krijgt %s$ bonus!
KNIFE_KILL = %s houd van zwaarden! Hij krijgt %s$ bonus!
RUSH_KILL= %s is Nr.%d doder in deze ronde! Hij krijgt %s$ bonus!
BOMB_PLANTED= %s heeft de bomb gelegd! Hij krijgt %s$ bonus!
BOMB_EXPLODE= De bom is geexplodeerd! %s krijgt %s$ bonus!
BOMB_DEFUSED= %s heeft de bom onschadelijk gemaakt door dik en dun! Hij krijgt %s$ bonus!
CMD_NO_TARGET= Sorry, speler %s kan niet gevonden worden!
MENU_NAME = Geef geld aan spelers.
MENU_AMOUNT= Hoeveelheid.
MENU_MORE= Meer...
MENU_BACK= Terug
MENU_EXIT= Verlaat
ALL_CTS= [Alle CT's]
ALL_TS= [Alle T's]
ALL_PLAYERS= [Alle spelers]
Also i should change this in my English translation:

Quote:

[en]
HEAD_SHOT = %s killed an enemy with an Head Shot! He gets %s$ bonus!
GRENADE_KILL = %s kill an enemy with a grenade! He gets %s$ bonus!
KNIFE_KILL = %s like swords! He gets %s$ bonus!
RUSH_KILL= %s is No.%d killer in this round! He gets %s$ bonus!
BOMB_PLANTED= %s planted the bomb! He gets %s$ bonus!
BOMB_EXPLODE= Bomb exploded! %s gets %s$ bonus!
BOMB_DEFUSED= %s defused the bomb through thick and thin! He gets %s$ bonus!
CMD_NO_TARGET= Sorry, player %s could not be found!
MENU_NAME = Give Money to Players
MENU_AMOUNT= Amount
MENU_MORE= More...
MENU_BACK= Back
MENU_EXIT= Exit
ALL_CTS= [All CTs]
ALL_TS= [All Ts]
ALL_PLAYERS= [All Players]
Thanks, crazyeffect!

Spunky 11-17-2008 14:54

Re: Money All-in-One
 
PHP Code:

new g_client_connected[32+1

Why not just:

PHP Code:

new g_client_connected[33

?

The 32+1 is completely unnecessary. You do that all throughout the plugin.

Also, this plugin will likely not work for all modifications. cs_user_set_money is a function limited to CStrike as far as I know.

ConnorMcLeod 11-17-2008 15:18

Re: Money All-in-One
 
Quote:

Originally Posted by [email protected] (Post 714879)
- For other coder, I think amx_givemoney cmd is good enough, so I don’t make .inc file.

Dynamic natives would be better.

benamo6 11-17-2008 16:41

Re: Money All-in-One
 
Ill make you ES version:

[es]
HEAD_SHOT = %s metio un Head Shot! El obtiene %s$
GRENADE_KILL = %s mato a un enemigo con una HE! El obtiene %s$
KNIFE_KILL = %s metio un fakaso! El obtiene %s$
RUSH_KILL= %s la rushio.%d asesino en esta ronda! El obtiene %s$
BOMB_PLANTED= %s planto la bomba! El obtiene %s$
BOMB_EXPLODE= Exploto la bomba! El que la planto: %s obtiene %s$
BOMB_DEFUSED= %s Defuseo la bomba! El obtiene %s$
CMD_NO_TARGET= El jugador %s no pudo ser encontrado.
MENU_NAME = Dio dinero a los jugadores.
MENU_AMOUNT= Cantidad
MENU_MORE= Mas...
MENU_BACK= Atras
MENU_EXIT= Exit
ALL_CTS= [All CTs]
ALL_TS= [All TTs]
ALL_PLAYERS= [Todos los jugadores]

+k please

[email protected] 11-17-2008 20:02

Re: Money All-in-One
 
Quote:

Originally Posted by hleV (Post 714913)
Will check it out.

BTW shouldn't CVAR amx_bonus_3ndkiller be amx_bonus_3rdkiller?

Oh, you have eagle eyes! :D

Sorry, I made a spelling mistake in my post. I'v been corrected it (:

I wish my plugin will be approved, thank you.

[email protected] 11-17-2008 20:08

Re: Money All-in-One
 
Quote:

Originally Posted by crazyeffect (Post 714938)
Dutch translation:



Also i should change this in my English translation:



Thanks, crazyeffect!


Thank you, crazyeffect. I'd appreciate it. (:

Arkshine 11-17-2008 20:18

Re: Money All-in-One
 
French translation :

Code:

[fr]
HEAD_SHOT = %s a tue un ennemi avec un tir en plein tete ! Il gagne %s$ en bonus !
GRENADE_KILL = %s a tue un ennemi avec une grenade ! Il gagne %s$ en bonus !
KNIFE_KILL = %s aime le couteau ! Il gagne %s$ en bonus !
RUSH_KILL= %s est No.%d des tueurs dans ce round ! Il gagne %s$ en bonus !
BOMB_PLANTED= %s a plante la bombe ! Il gagne %s$ en bonus !
BOMB_EXPLODE= Bombe explosee ! %s gagne %s$ en bonus !
BOMB_DEFUSED= %s a desamorce la bombe dans le feu de l'action ! Il gagne %s$ en bonus !
CMD_NO_TARGET= Desole, le joueur %s n'a pas ete trouve !
MENU_NAME = Donner de l'argent a des joueurs
MENU_AMOUNT= Quantite
MENU_MORE= Plus...
MENU_BACK= Retour
MENU_EXIT= Quitter
ALL_CTS= [Tous les CTs]
ALL_TS= [Tous les Ts]
ALL_PLAYERS= [Tous les Joueurs]


[email protected] 11-17-2008 20:18

Re: Money All-in-One
 
Quote:

Originally Posted by Spunky (Post 715019)
PHP Code:

new g_client_connected[32+1

Why not just:

PHP Code:

new g_client_connected[33

?

The 32+1 is completely unnecessary. You do that all throughout the plugin.

Also, this plugin will likely not work for all modifications. cs_user_set_money is a function limited to CStrike as far as I know.

Yes, this plugin for Counter-Strike 1.6 mod only, I'v not tested it for another. (:

I write 32 + 1 to prevent mistake of out boundary error. I think it is a good habit to define a array like that. (:


All times are GMT -4. The time now is 03:25.

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