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

round_startmoney


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Event Related        Approver:   ConnorMcLeod (74)
mlb
Junior Member
Join Date: May 2011
Location: US
Old 05-29-2011 , 05:01   round_startmoney
Reply With Quote #1

In incredibly simple and clean plugin that makes sure the player has at least 'mp_startmoney' worth of money at the start of every round. There is no 'enable' variable either. Although if that is something someone thinks would be useful, I can easily add.

I saw others with similar scripts but that used a separate variable for the round money, instead of using 'mp_startmoney'. I see no point to that, so I made this.

This is my first plugin, but I hope it isn't too similar to others to be useful.

Required: hamsandwich
Attached Files
File Type: sma Get Plugin or Get Source (round_startmoney.sma - 7214 views - 722 Bytes)

Last edited by mlb; 05-29-2011 at 07:58. Reason: Updated
mlb is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 05-29-2011 , 05:05   Re: round_startmoney
Reply With Quote #2

Remove .amxx because when you upload .sma it automaticly compiles and uploads .amxx too ;)

Also why did you make a stock and a pcvar ?


PHP Code:
stock GetStartMoney()
   return 
get_pcvar_num(g_money); 
Can't you use just this :

PHP Code:
new pMoney get_cvar_num("mp_startmoney"
instead.

Last edited by reinert; 05-29-2011 at 05:07.
reinert is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-29-2011 , 05:34   Re: round_startmoney
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?p=221246

Use mp_startmoney doesn't make any difference.

You you make a plugin that set player min money before he can buy (hook player spawn), i can reconsider it.

Unapproved.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-29-2011 at 05:38.
ConnorMcLeod is offline
mlb
Junior Member
Join Date: May 2011
Location: US
Old 05-29-2011 , 07:59   Re: round_startmoney
Reply With Quote #4

Quote:
Originally Posted by reinert View Post
Remove .amxx because when you upload .sma it automaticly compiles and uploads .amxx too ;)

Also why did you make a stock and a pcvar ?


PHP Code:
stock GetStartMoney()
   return 
get_pcvar_num(g_money); 
Can't you use just this :

PHP Code:
new pMoney get_cvar_num("mp_startmoney"
instead.
I don't like having extra queries when a single variable could be stored, making it a lot quicker. As for the stock... I don't know much about the language, but I assumed it was something like 'inline' from reading the examples. I removed the stock and am just using the get_pcvar_num now.

Quote:
Originally Posted by ConnorMcLeod View Post
http://forums.alliedmods.net/showthread.php?p=221246

Use mp_startmoney doesn't make any difference.

You you make a plugin that set player min money before he can buy (hook player spawn), i can reconsider it.

Unapproved.
Changed it. It now uses the player spawn. And thank you for your suggestion, I think it's much better now.

I'm not sure of the resubmitting process, but I have replaced the file in the original post.
mlb is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-29-2011 , 09:24   Re: round_startmoney
Reply With Quote #5

Approved
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
DUBMANJEIRE
Junior Member
Join Date: Nov 2011
Old 08-06-2012 , 15:03   Re: round_startmoney
Reply With Quote #6

Hi,

Great plugin.. thx,

Very useful for always min amount 4700 to stop AWP hoaring but will also let people earn more if the play well.

Any possible way to add 800 only for first round in same plugin?
or can you recommend a way to do it and then have 4700 min using the least amount of plugins?

Thx....

:-J
DUBMANJEIRE 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 12:41.


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