Raised This Month: $95 Target: $400
 23% 

Amx UnConstant Cvar v1.1 (2 - 20 - 05)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   v3x (159)
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 02-14-2006 , 01:01   Amx UnConstant Cvar v1.1 (2 - 20 - 05)
Reply With Quote #1

Amx UnConstant Cvar - v1.1, by Suicid3

Description:
Amx UnConstant is used to have a cvar switch between different values. With a certain amount of time between each value. Ability to hold any number of values. (But must be set-up in .sma before compile)

Commands: (Look below at example commands)
amx_unconstant <Cvar> <Value 1> <Value 2> [<Value 3> ...]
Must have atleast two values to switch between or it defeats the purpose.
amx_constant <Cvar> <Value>
Stops changing values and sets the cvar to the value supplied.

Cvars:
amx_unconst_rate 2.0
The time between unconstant cvar changes.(Don't set too low)
amx_unconst_allow_multiples 0
Allows/Disallows the same unconstant cvar to be used simlutaniously

Required Modules:
None

More to Know:
//The max number of unconstant cvars
#define MAX_UNCONSTANTS 26

//The max number of values for each unconstant cvar
#define MAX_VALUES 6

Change log:
  • v1.0 -- Initial Release
    v1.1 -- Added functionality for using quotes inside of quotes.
    • -- Fixed bug while adding the optional quotes.

Example Commands:
Quote:
Originally Posted by Badly formatted command line
]amx_unconstant sv_password"Here I am"I LikeThis
[UnConst] Successfully initiated unconstant values for cvar sv_password
[UnConst] 1. Here I am
[UnConst] 2. I
[UnConst] 3. LikeThis
Quote:
Originally Posted by Well formatted command line
] amx_unconstant sv_password "Here I am" I LikeThis
[UnConst] Successfully initiated unconstant values for cvar sv_password
[UnConst] 1. Here I am
[UnConst] 2. I
[UnConst] 3. LikeThis
Quote:
Originally Posted by Badly formatted command line
] amx_unconstant sv_password "Using ^"quotes^""again here"I am"
[UnConst] Successfully initiated unconstant values for cvar sv_password
[UnConst] 1. Using "quotes"
[UnConst] 2. again
[UnConst] 3. here
[UnConst] 4. I am
Quote:
Originally Posted by Well formatted command line
] amx_unconstant sv_password "Using ^"quotes^"" again here "I am"
[UnConst] Successfully initiated unconstant values for cvar sv_password
[UnConst] 1. Using "quotes"
[UnConst] 2. again
[UnConst] 3. here
[UnConst] 4. I am
Using the Commands:
Using amx_unconstant:
  • - You may use quotes within quotes with the ^ (carrot) infront of the quote (Example above)
    - The cvar (first argument) can either be in or out of a quote.
    - Must have atleast two cvar values to switch between.
    - Values can NOT be blank they will not be read.
Using amx_constant:
  • - The cvar comes first. Then the constant value for it comes next.
    - No value after and it is set as blank.(possibly screw some plugins up be careful)


Still don't get it?
Let's use for instance sv_gravity. We set the different values at 250 550 300 600 and it will loop through these values. So you're running and you happen to jump (at this second gravity is at 300) so you get up a decent height and then BOOM! it's back up to 600 and you start to fall faster than you thought and miss your platform :D.
Or you could set it up to change the hostname to different things everyfew seconds so people can see different things. (This sadly will help the guy who wanted a scrolling hostname)
Or you could screw around with hook cvars (making it hook faster then slower and pull you faster and slower and other little things like this).
This is only limitless to the amount of plugins you have controlled by cvars.

Enjoy :D
Attached Files
File Type: sma Get Plugin or Get Source (unconstant_cvar.sma - 1363 views - 8.8 KB)
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-14-2006 , 01:42  
Reply With Quote #2

I remember this request. Looks good. (A lot of color in your post lol)
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
uTg | bigpapajiggs
Senior Member
Join Date: Sep 2005
Location: Bellingham, WA
Old 02-14-2006 , 01:56  
Reply With Quote #3

Nice plugin Suicide! I'm going to use this
__________________
What's my confidence level? I do crossword puzzles with a pen.
uTg | bigpapajiggs is offline
Send a message via AIM to uTg | bigpapajiggs Send a message via MSN to uTg | bigpapajiggs Send a message via Yahoo to uTg | bigpapajiggs
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-14-2006 , 07:15  
Reply With Quote #4

That's err ... My plugin posting template
__________________
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
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 02-14-2006 , 07:31  
Reply With Quote #5

Quote:
Originally Posted by v3x
That's err ... My plugin posting template
Yes, yes it is.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-14-2006 , 07:34  
Reply With Quote #6

I shall steal some of your colors then! muahahahaha

I wanted the scrolling hostname!!1
__________________
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
mofomikeman
Junior Member
Join Date: Nov 2005
Old 02-14-2006 , 12:48  
Reply With Quote #7

THIS
Code:
amx_unconstant hostname "[ZAN] climb mod" "[ZAN] Climb mod" "[ZAN] CLimb mod" "[ZAN] CLImb mod" "[ZAN] CLIMb mod" "[ZAN] CLIMB mod" "[ZAN] CLIMB Mod" "[ZAN] CLIMB MOd" "[ZAN] CLIMB MOD"
DOES THISEDIT: actually does this
Code:
"[ZAN]" "Climb" "[ZAN]" "climb" "mod"
I changed whta it does, I thought it worked a lil better, but it actually repeats those 5 over and over... really retarted.

I put it in my amxx.cfg file... though that shouldn't matter, should it?

Help!
__________________
+ Karma Please
mofomikeman is offline
Send a message via AIM to mofomikeman Send a message via MSN to mofomikeman
Rcow
Member
Join Date: Jan 2006
Old 02-15-2006 , 11:43  
Reply With Quote #8

i REQUESTED THIS
Rcow is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 02-15-2006 , 13:05  
Reply With Quote #9

Quote:
Originally Posted by Rcow
i REQUESTED THIS
Good job.........?

@mofomikeman: I will have the update later today hopefully.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-17-2006 , 01:25  
Reply With Quote #10

Ew, its static.

Needs more dynamicness.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 11:15.


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