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

Repair Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   twistedeuphoria (82)
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-11-2005 , 02:40   Repair Damage
Reply With Quote #1

Repair Damage
Author: v3x & FoX Rider
Date: March 11th, 05'
Description: Allows you to "repair" lost damage by taking a certain amount of cash out depending on your condition.
---
Cvars:
repair_active <1|0>
- Allow repairs (default 1)
repair_armor <1|0>
- Repair armor also (default 1)
repair_msg <1|0>
- Show repair message @ round start (default 1)
---
Commands:
say /repair
say_team /repair
---
Required Modules:
- Cstrike
- Fun
---
To do:
- Add a limit to the max amount of repairs per round
---
Credits:
FoX Rider for the idea, and myself for making it .
Attached Files
File Type: sma Get Plugin or Get Source (repair.sma - 4762 views - 2.7 KB)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
neXXus`
Member
Join Date: Mar 2005
Location: Germany
Old 03-11-2005 , 10:09  
Reply With Quote #2

hm yeah, nice idea
but as i can see from the code it is only possible to "repair" your healthpoints back to 100, wouldn't it be nicer if you can regain life until you have no more cash, for example you have 10hp and 2000$ and you have 30hp or whatever at the end and 0$
that would be possible with a price per 1hp or so i think. make a loop that adds 1hp and subtracts an amount of $ till life is 100 or money is exhausted
neXXus` is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 03-11-2005 , 17:44  
Reply With Quote #3

Yes, there is a better way.
Code:
switch(hp) {     case 10:     {         //stuff     }     case 20:     {         //stuff     } //etc etc }
__________________
twistedeuphoria is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-11-2005 , 18:21  
Reply With Quote #4

Yea, I know that . But how would I make >= within a switch statement?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-11-2005 , 19:27  
Reply With Quote #5

fox rider told me he was gonna make this himself... hmm. I geuss he coudlnt find a way to code it.

also, maybe u can use a switch that uses a rounded up number? like if your hp is < 50 but > 40, then make it = 50, and go from there,.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-11-2005 , 19:35  
Reply With Quote #6

Nah, he asked me a question and I kinda took it over.. So we agreed to such and so, and I gave him credit for it.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 03-11-2005 , 19:35  
Reply With Quote #7

Does this work in small?
Code:
switch(hp) {     case 10:     case 20:     {         //blah         //blah     } }
__________________
twistedeuphoria is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-11-2005 , 19:42  
Reply With Quote #8

Yea, works fine..

What I'm asking for is how to do "is less then or equal to" in a switch statement.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
FoX Rider
Member
Join Date: Feb 2005
Location: AK
Old 03-11-2005 , 19:44  
Reply With Quote #9

Ha. Yes, I did have a bit of trouble coding this, and v3x took over. At least I get to see my ideas put to work.

Good job v3x.
__________________
Ride for fox..Die for fox.
FoX Rider is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 03-12-2005 , 13:53  
Reply With Quote #10

Yea v3x, oops
__________________
twistedeuphoria 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 05:55.


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