AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Round Survival Money (https://forums.alliedmods.net/showthread.php?t=61523)

X-Script 10-02-2007 16:48

Round Survival Money
 
1 Attachment(s)
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?


M249-M4A1 10-02-2007 16:58

Re: Round Survival Money
 
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.

Reaper2331 10-02-2007 17:02

Re: Round Survival Money
 
nice idea, and yeah i agree with m249

i will Test this later on tonight

X-Script 10-02-2007 17:06

Re: Round Survival Money
 
Quote:

Originally Posted by M249-M4A1 (Post 538022)
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 (Post 538022)
Or, even better, if the user gets at least x kills AND survives, he gets the $3000 bonus.

Eh. :/

X-Script 10-02-2007 17:10

Re: Round Survival Money
 
UPDATED

-Changed default money to $3,000

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

M249-M4A1 10-02-2007 17:25

Re: Round Survival Money
 
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. :D

X-Script 10-02-2007 17:29

Re: Round Survival Money
 
Nope ID should not be called with the set_task function because it specifies time only.

M249-M4A1 10-02-2007 17:37

Re: Round Survival Money
 
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 - 17:34:45: [CSTRIKE] Player out of range (0)
L 10/02/2007 - 17:34:45: [AMXX] Run time error 10 (plugin "survivalcash.amxx") (native "cs_get_user_money") - debug not enabled!
L 10/02/2007 - 17:34:45: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

X-Script 10-02-2007 17:41

Re: Round Survival Money
 
UPDATED

I should've used
PHP Code:

register_event("HLTV""event_new_round""a""1=0""2=0"

instead, try now.

ConnorMcLeod 10-02-2007 17:50

Re: Round Survival Money
 
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.


All times are GMT -4. The time now is 21:08.

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