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

Donations v2.0.1 ( 24/04/2014 )


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-30-2013 , 23:41   Donations v2.0.1 ( 24/04/2014 )
Reply With Quote #1


( Frags | Money | Weapons | Health | Armor | NVision | Defuse Kit )
v2.0.1
By Blizzard.

ThreadStart
Note: Complete Rewrite, Must Have Latest Version Of Amxx 1.8.3 For Compiling!

With this plugin your able to donate almost every item in a players inventory, { Health, Armor, Money, Weapons, Frags, Night Vision, Defuse Kit } ( Excluding Knife ).

From v2.0.0 you are no longer able to set the minimum limit, this ive hardcoded into the plugin to Prevent Bugs/Glitches with donation amounts.

Ive added a Calculator for the categories with amounts, example: if player (B) has $12000 and player (A) donates $6000, then only $4000 will be donated.
prevents player (A) losing $6000 when only $4000 is required to reach player (B) max.

Ive removed the Ask For Donation feature as you can request by using chat.

Ive added feature where if a player is already in the process of recieving a donation no other players can interfere by overlapping the donations.

New: I've added Maximum donation limits.

Say Commands:
*donate ( Opens Donations Main Menu )
*toggledonate ( Toggles Recieving Donations On/Off For Player )

* = "/", "!", "."

donate_flags "abcdefg" ( default all enabled )
  • a = health
  • b = armor
  • c = money
  • d = frags
  • e = weapons
  • f = night vision
  • g = defuse kit

donate_limit "-1" ( default unlimited )
  • -1 = unlimited
  • 0 = player either used up all donations that round or plugin is disabled
  • 1 or greater = the amount of times player can donate in one round.

donate_team "0" ( default 0 both teams )
  • 0 = both teams
  • 1 = your team only

donate_admin "0" ( default 0 all players can use )
  • 0 = all players can use menu
  • 1 = only admins with BAN flag "d" can use

donate_hp_max "90" ( default 90 )

donate_ap_max "100" ( default 100 )

donate_money_max "16000" ( default 16000 )

donate_frag_max "10" ( default 10 )
Find this section close to top of file line 107
Code:
/*----------------------- -  EDIT MAX VALUES HERE - -----------------------*/ #define MAX_HP      100 #define MAX_AP      100 #define MAX_MONEY   16000 /*----------------------- -  DONT EDIT BELOW HERE - -----------------------*/
Edit the Values For Maximum Amount Allowed In Total ( This Is Different To Max Donation Limit ).
In the case of ZP you should set the max HP to what your plugin is set to.

roymor - Amount Of Donations Idea
Jhob94 - for extra donation types idea
hornet - for majorly helping with optimizing transfer weapons more effectively.
black rose - pointing out places for optimization.

Servers Using This Plugin Here

Change Log

ThreadEnd
.
Attached Files
File Type: sma Get Plugin or Get Source (donations.sma - 1242 views - 30.5 KB)
__________________

Last edited by Blizzard_87; 05-03-2015 at 09:31.
Blizzard_87 is offline
Old 04-30-2013, 23:41
Blizzard_87
This message has been deleted by Blizzard_87.
rasik
Member
Join Date: Nov 2011
Old 05-01-2013 , 02:18   Re: Donations
Reply With Quote #2

O.o
nice 1

but i dont think any 1 would give his frags to any 1 , not in this world .. and money ?? almost today all sv uses 16000 round money
rasik is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-01-2013 , 03:14   Re: Donations
Reply With Quote #3

Quote:
Originally Posted by rasik View Post
O.o
nice 1

but i dont think any 1 would give his frags to any 1 , not in this world .. and money ?? almost today all sv uses 16000 round money
1. thanks.

2. would be good in servers which have gameplay mods which req players to lvl up and gain money frags etc. then they could get friends to help them if they have more money etc... it can be useful.
__________________
Blizzard_87 is offline
PoLiCe
Senior Member
Join Date: Apr 2013
Location: Xen™
Old 05-01-2013 , 03:48   Re: Donations
Reply With Quote #4

Nice plugin man,
looking for more from you!
__________________
PoLiCe is offline
Send a message via MSN to PoLiCe Send a message via Skype™ to PoLiCe
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-01-2013 , 03:48   Re: Donations
Reply With Quote #5

Quote:
Originally Posted by PoLiCe View Post
Nice plugin man,
looking for more from you!
thanks
__________________
Blizzard_87 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-01-2013 , 04:20   Re: Donations
Reply With Quote #6

Code:
public client_connect( id ) g_bDonateUsed[ id ] = false; public CSBase_PlayerPost_Spawn( id ) g_bDonateUsed[ id ] = false; public client_disconnect( id ) g_bDonateUsed[ id ] = false;
Right there you've got 3 forwards doing the same thing. Ham_Spawn is called once when player connects so that would be the only one you need.

In some cases you send info in menu_additem() but you don't retrieve it, which means no need to send it. Also, player indexes can change, so when selecting a player you should use the player's userid and send that in menu_additem() instead of player index. Something you've missed aswell is checking to see if the player is still connected - you might donate to the wrong player otherwise.

You may also want to revise your readability with variable names, eg. g_szDonationTarget is numerical.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-01-2013 , 05:12   Re: Donations
Reply With Quote #7

Quote:
Originally Posted by hornet View Post
Code:
public client_connect( id ) g_bDonateUsed[ id ] = false; public CSBase_PlayerPost_Spawn( id ) g_bDonateUsed[ id ] = false; public client_disconnect( id ) g_bDonateUsed[ id ] = false;
Right there you've got 3 forwards doing the same thing. Ham_Spawn is called once when player connects so that would be the only one you need.

In some cases you send info in menu_additem() but you don't retrieve it, which means no need to send it. Also, player indexes can change, so when selecting a player you should use the player's userid and send that in menu_additem() instead of player index. Something you've missed aswell is checking to see if the player is still connected - you might donate to the wrong player otherwise.

You may also want to revise your readability with variable names, eg. g_szDonationTarget is numerical.

Updated v1.0.1

edited all you have stated apart from the players userid im having trouble getting it working 100% so atm left it at players index.
__________________
Blizzard_87 is offline
MLZz3
BANNED
Join Date: Mar 2013
Location: Granada, Andalucia, Spai
Old 05-01-2013 , 05:35   Re: Donations
Reply With Quote #8

Plugin, "Donate Money" was created...

Last edited by MLZz3; 05-01-2013 at 05:36.
MLZz3 is offline
Send a message via Skype™ to MLZz3
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-01-2013 , 06:05   Re: Donations
Reply With Quote #9

Quote:
Originally Posted by MLZz3 View Post
Plugin, "Donate Money" was created...
this does both money and frags.
__________________
Blizzard_87 is offline
tonykaram1993
Senior Member
Join Date: Mar 2013
Location: This World
Old 05-01-2013 , 07:14   Re: Donations
Reply With Quote #10

Maybe add a fee of transfer? Like for example, whenever you transfer any amount of money/frags, the fee will be 100$/5 frags for example
__________________
My Plugins:
UltimatePlugin
UltimateSurf
UltimateAdmin
Code:
rcon version | rcon amxx version | rcon meta version
rcon amxx plugins | rcon meta list | rcon status
I AM INACTIVE ON THIS FORUM - For direct contact: [email protected]
tonykaram1993 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 04:01.


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