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

Round Survival Money


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 10-02-2007 , 16:48   Round Survival Money
Reply With Quote #1

ROUND SURVIVAL MONEY

Tired of only getting $1000 dollars when you win a round? What it basically does is when the round is started it'll tell you in a message that you must survive the whole round in order to gain 'X' amount of money 'X' is controlled by a CVAR. When the round ends it'll tell you in a message IF YOUR ALIVE, you've survived the round and have been given 'X' amount of money 'X' is once again controlled by a CVAR.

CVARS:
amx_survivemode - Turns plugin on/off (DEFAULT: 1)
amx_survivecash - Controls how much money the surviving players are given (DEFAULT: $3000)

CREDITS:
M429-M4A1: Coding Help
connorr: Coding Help

MODULES:
cstrike
fun

Not sure if this has been made already but if it has, i'll add some more things to it once I get some feedback such as maybe health or small sounds?

Attached Files
File Type: sma Get Plugin or Get Source (survivalcash.sma - 940 views - 1.9 KB)

Last edited by X-Script; 10-02-2007 at 18:40.
X-Script is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 10-02-2007 , 16:58   Re: Round Survival Money
Reply With Quote #2

16000 is too much for surviving one round. $3000 is a good default. Also, maybe a user-glow for 5 or 10 seconds for survivors on new round to show others that this player has survived from the last round.

Or, even better, if the user gets at least x kills AND survives, he gets the $3000 bonus.
__________________
M249-M4A1 is offline
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 10-02-2007 , 17:02   Re: Round Survival Money
Reply With Quote #3

nice idea, and yeah i agree with m249

i will Test this later on tonight
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 10-02-2007 , 17:06   Re: Round Survival Money
Reply With Quote #4

Quote:
Originally Posted by M249-M4A1 View Post
16000 is too much for surviving one round. $3000 is a good default. Also, maybe a user-glow for 5 or 10 seconds for survivors on new round to show others that this player has survived from the last round.
Doing this now, thanks except i've got to figure out how to glow for 8 seconds o.O

Quote:
Originally Posted by M249-M4A1 View Post
Or, even better, if the user gets at least x kills AND survives, he gets the $3000 bonus.
Eh. :/
X-Script is offline
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 10-02-2007 , 17:10   Re: Round Survival Money
Reply With Quote #5

UPDATED

-Changed default money to $3,000

-Added glow time for survivors for a default of eight seconds.

Last edited by X-Script; 10-02-2007 at 17:16.
X-Script is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 10-02-2007 , 17:25   Re: Round Survival Money
Reply With Quote #6

In
PHP Code:
set_task(8.0"glow_off"
do you need to pass "id" in there? Just from looking at it, I don't know if it will really turn off the user's glowing. Then again, I don't really like set_tasks...

Anyway, nice!

PS: You also mispelled "Connect" in your signature.
__________________
M249-M4A1 is offline
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 10-02-2007 , 17:29   Re: Round Survival Money
Reply With Quote #7

Nope ID should not be called with the set_task function because it specifies time only.
X-Script is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 10-02-2007 , 17:37   Re: Round Survival Money
Reply With Quote #8

Ok, other than that, the plugin doesn't seem to work for me. On a new round, no message shows up, leading me to believe the logevent wasn't called by any specific person, so no ID was even passed.

And when the server changes map with no players on it, it gives this error (which backs up the reason above):

Quote:
L 10/02/2007 - 174:45: [CSTRIKE] Player out of range (0)
L 10/02/2007 - 174:45: [AMXX] Run time error 10 (plugin "survivalcash.amxx") (native "cs_get_user_money") - debug not enabled!
L 10/02/2007 - 174:45: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
__________________
M249-M4A1 is offline
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 10-02-2007 , 17:41   Re: Round Survival Money
Reply With Quote #9

UPDATED

I should've used
PHP Code:
register_event("HLTV""event_new_round""a""1=0""2=0"
instead, try now.
X-Script is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-02-2007 , 17:50   Re: Round Survival Money
Reply With Quote #10

Code:
new moneyadd1 new moneyadd
Those 2 globals are not needed as they are used only in 1 function, so declare the variable in the function that use it.



Why are you trying to give money both at round end and at new round ?
Also you should know that you can die between round end and new round events, so it's better to check if players are alive at new round event.

You can't catch id as you try to :
Code:
public event_new_round(id)
Code:
public logevent_round_end(id)
Man did you test your plugin ?



Code:
set_task(8.0, "glow_off")
You should at least do :
Code:
set_task(8.0, "glow_off", id)
to make this task work.

Last edited by ConnorMcLeod; 10-02-2007 at 17:53.
ConnorMcLeod 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 14:20.


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