Raised This Month: $100 Target: $400
 25% 

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 , 06: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 - 6335 views - 722 Bytes)

Last edited by mlb; 05-29-2011 at 08:58. Reason: Updated
mlb is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 05-29-2011 , 06: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 06:07.
reinert is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-29-2011 , 06: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 -

Last edited by ConnorMcLeod; 05-29-2011 at 06:38.
ConnorMcLeod is offline
mlb
Junior Member
Join Date: May 2011
Location: US
Old 05-29-2011 , 08: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 , 10:24   Re: round_startmoney
Reply With Quote #5

Approved
__________________
- tired and retired -
ConnorMcLeod is offline
DUBMANJEIRE
Junior Member
Join Date: Nov 2011
Old 08-06-2012 , 16: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


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


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