AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   check plugin status (https://forums.alliedmods.net/showthread.php?t=13273)

n0obie4life 05-10-2005 07:34

check plugin status
 
i'll get straight to the point here.

if i have

amx_a
amx_b
amx_c
amx_d
amx_e

and if i want to enable amx_e and if anyone if amx_a/b/c/d is on, it will disable it and enable E automatically.

how do i do that? i know it has something to do with ifs?

n0obie4life 05-10-2005 07:38

also


does anyone know how to use a command to check the amount of time left before the next vote

n0obie4life 05-12-2005 06:06

help?

n0obie4life 05-14-2005 04:24

ANYONE?

XunTric 05-14-2005 16:13

Umm...
I dont get your point...

You mean if you have numbers from 1 to 20;
and if you use number 5, then all numbers under 5 will get disabled?

What about all numbers over 5 then?

And what you mean with enable?
Are those cmds supposed to be cvars?

------------------------------------------
EDIT:

Like this?
Code:
#include <amxmodx> new bool:A new bool:B new bool:C new bool:D new bool:E public plugin_init() {     register_concmd("amx_a", "amx_a")     register_concmd("amx_b", "amx_b")     register_concmd("amx_c", "amx_c")     register_concmd("amx_d", "amx_d")     register_concmd("amx_e", "amx_e") } public amx_a() {      //Enable A      A = true } public amx_b() {      //Disable A      A = false      //Enable B      B = true } public amx_c() {      //Disable A and B      A = false      B = false      //Enable C      C = true } public amx_d() {      //Disable A,B and C      A = false      B = false      C = false      //Enable D      D = true } public amx_e() {      //Disable A,B,C and D      A = false      B = false      C = false      D = false            //Enable E      E = true }

n0obie4life 05-15-2005 03:25

Quote:

Originally Posted by XunTric
Umm...
I dont get your point...

You mean if you have numbers from 1 to 20;
and if you use number 5, then all numbers under 5 will get disabled?

What about all numbers over 5 then?

And what you mean with enable?
Are those cmds supposed to be cvars?

------------------------------------------
EDIT:

Like this?
Code:
#include <amxmodx> new bool:A new bool:B new bool:C new bool:D new bool:E public plugin_init() {     register_concmd("amx_a", "amx_a")     register_concmd("amx_b", "amx_b")     register_concmd("amx_c", "amx_c")     register_concmd("amx_d", "amx_d")     register_concmd("amx_e", "amx_e") } public amx_a() {      //Enable A      A = true } public amx_b() {      //Disable A      A = false      //Enable B      B = true } public amx_c() {      //Disable A and B      A = false      B = false      //Enable C      C = true } public amx_d() {      //Disable A,B and C      A = false      B = false      C = false      //Enable D      D = true } public amx_e() {      //Disable A,B,C and D      A = false      B = false      C = false      D = false            //Enable E      E = true }

i mean that, if i have numbers 1 to 20 and i enable 5.

ALL other numbers will be disabled (if its activated) but 5 :) .

then if i wanna enable 8, all the rest will be disabled.

so IOW, if 1 number is enabled, the rest will be disabled.

XunTric 05-15-2005 04:57

If your going to use many cmd's like this, this are gonna use a lot of code, though.

Code:
#include <amxmodx> new bool:A new bool:B new bool:C new bool:D new bool:E public plugin_init() {     register_concmd("amx_a", "amx_a")     register_concmd("amx_b", "amx_b")     register_concmd("amx_c", "amx_c")     register_concmd("amx_d", "amx_d")     register_concmd("amx_e", "amx_e") } public amx_a() {      //Enable A      A = true      //Disable B,C,D and E      B = false      C = false      D = false      E = false } public amx_b() {      //Disable A      A = false      //Enable B      B = true      //Disable C,D and E      C = false      D = false      E = false } public amx_c() {      //Disable A and B      A = false      B = false      //Enable C      C = true      //Disable D and E      D = false      E = false } public amx_d() {      //Disable A,B and C      A = false      B = false      C = false      //Enable D      D = true      //Disable E      E = false } public amx_e() {      //Disable A,B,C and D      A = false      B = false      C = false      D = false            //Enable E      E = true }

n0obie4life 05-15-2005 05:03

thanks.

how does the bool know which one is which? btw, it is possible to use "if" instead?[/small]


All times are GMT -4. The time now is 16:44.

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