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

[Forwards][Cstrike] [Round]StartMoney


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-23-2012 , 11:51   [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #1

client_startmoney and client_roundstartmoney forwards



.: Description :.


The plugin offers 2 forwards that allow you to hook startmoney (when enter the server or after a restart) and roundstartmoney (money set at new round right before the player spawn, after the round money bonus has been given).



.: Forwards :.

client_startmoney < player index > < start money amount >
client_roundstartmoney < player index > < roundstart money amount >

Returns : positive value if you want to change it, negative value to ignore


.: Notes :.


When a sv_restart or sv_restartround is made, both forwards will be sent, i've took the decision to let the startmoney one because, for example, you may want to give advantages to admins only for the startmoney.

.: Plugin Example :.

Spoiler


Attached Files
File Type: sma Get Plugin or Get Source (fwd_start_money.sma - 936 views - 3.2 KB)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-07-2012 at 20:29.
ConnorMcLeod is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 02-23-2012 , 12:06   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #2

Nice work.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 02-23-2012 , 12:11   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #3

GJ!
__________________
kiki33hun is offline
Carlen20
Senior Member
Join Date: Jun 2011
Location: Sweden
Old 02-23-2012 , 14:18   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #4

Good jobb Connor as always
__________________
Nothing are impossible if you just use your mind!

Quote:
Originally Posted by NiceGuyx View Post
P.S: i'm the best coder here


Last edited by Carlen20; 02-23-2012 at 14:19.
Carlen20 is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 02-23-2012 , 14:26   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #5

This is useful for newbies.

One question though.

Can we determine the formula after which the roundmoney are calculated. It would be nicer if we would also know that IMO.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 02-23-2012 , 14:30   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #6

Quote:
Originally Posted by ot_207 View Post
Can we determine the formula after which the roundmoney are calculated. It would be nicer if we would also know that IMO.
http://www.bosskey.net/cs/money.html
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 02-23-2012 , 14:40   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #7

Quote:
Originally Posted by Emp` View Post
Oh, nice.
Didn't know about that.

This would be useful to be added here. Also forwards for each action would be nice.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-24-2012 , 01:20   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #8

Those values are obsolete.

On bombs maps :
Ts win $3500 if they win the round by exploding the bomb
Else, any wining team receive $3250

Also loosers bonus is min(1500 + (lost rounds - 1) * 500, 3000)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 02-24-2012 at 01:21.
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-24-2012 , 06:33   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #9

Just fastly looked in IDA. Will recheck one more time later.

Code:
TEAM MONEY - WIN (CHalfLifeMultiplay::CheckWinConditions)

    // VIP MAP
    CT   VIP escaped                                 +$3500
    T    VIP assassinated                            +$3250

    // PRISON MAP
    CT   Prevents terrorists escape                  +$ = ( 1 - escapeRatio ) * 3500 ; escapeRatio = numEscaped / numEscapers
    T    Terrorists escaped                          +$3150

    // BOMB MAP
    CT   Bomb defused                                +$3520 to Counter-Terrorists, $800 to Terrorists
    T    Bomb exploded                               +$3250

    // HOSTAGE MAP
    CT   All hostages rescued                        +$2500

    // ALL
    CT   Terrorist team extermination                +$3000 (+$250 with bomb target)
    T    Counter-Terrorist team extermination        +$3000 (+$250 with bomb target)
    

TEAM MONEY - BONUS (CHalfLifeMultiplay::RestartRound)

    // HOSTAGE MAP
    Surviving hostage bonus                          +$250 per hostage (to a maximum of $2000)
    Hostage rescued bonus                            +$ = hostageRescued * 750
    Teammate touching ("using") a hostage            +$100
    
    // ALL
    Either team loses over two consecutive rounds    +$1500 (+$500 per additional round (to a maximum of $3000))
    Default loser bonus on complete restart           $1400
    

INDIVIDUAL MONEY
 
    // VIP MAP (CHalfLifeMultiplay::PlayerKilled)
    Killing the vip                                  +$2500

    // HOSTAGE MAP (CHostage::GiveCTTouchBonus, CHostage::TakeDamage, CHostage::IdleThink )
    Touching ("using") a hostage                     +$150
    Hurting a hostage                                -$ = -20 * damageReceived         
    Killing a hostage                                -$ = -( 20 * damageReceived + 500 )
    Rescue a hostage                                 +$1000
    
    // VIP MAP (CVIP_SafetyZone::VIP_SafetyTouch)
    Escaped as VIP                                   +$2500
    
    // ALL (CHalfLifeMultiplay::PlayerKilled)
    Killing an enemy                                 +$300
    Killing a teammate                               -$3300
__________________
Arkshine is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 03-22-2014 , 05:06   Re: [Forwards][Cstrike] [Round]StartMoney
Reply With Quote #10

I use the client_startmoney in one of my plugins, but then my server crashes with Segmentation fault.
Will this be updated? Or what else could be the issue?

PHP Code:
public client_startmoney(idiMoney)
{
    return 
2500

__________________
Kia is offline
Reply



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 00:20.


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