AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Amx UnConstant Cvar v1.1 (2 - 20 - 05) (https://forums.alliedmods.net/showthread.php?t=24181)

Xanimos 02-14-2006 00:01

Amx UnConstant Cvar v1.1 (2 - 20 - 05)
 
1 Attachment(s)
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

GHW_Chronic 02-14-2006 00:42

I remember this request. Looks good. (A lot of color in your post lol)

uTg | bigpapajiggs 02-14-2006 00:56

Nice plugin Suicide! I'm going to use this :)

v3x 02-14-2006 06:15

That's err ... My plugin posting template :evil:

Xanimos 02-14-2006 06:31

Quote:

Originally Posted by v3x
That's err ... My plugin posting template :evil:

Yes, yes it is. :twisted:

v3x 02-14-2006 06:34

I shall steal some of your colors then! muahahahaha :twisted:

I wanted the scrolling hostname!!1

mofomikeman 02-14-2006 11:48

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!

Rcow 02-15-2006 10:43

i REQUESTED THIS

Xanimos 02-15-2006 12:05

Quote:

Originally Posted by Rcow
i REQUESTED THIS

Good job.........?

@mofomikeman: I will have the update later today hopefully.

Twilight Suzuka 02-17-2006 00:25

Ew, its static.

Needs more dynamicness.


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

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