Raised This Month: $ Target: $400
 0% 

[SOLVED]add new cvar for old concmd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-14-2009 , 04:53   [SOLVED]add new cvar for old concmd
Reply With Quote #1

PHP Code:
register_concmd("amx_test","do_it_now",ADMIN_RCON," Between 0 & 30 )"
this is my old concmd which i used in one plug-in. now i can't find my sma anymore & i dont want to remake my plug-in again.now i want to know how can i make a task "0.5" & new cvar which works for example so :


amx_haha <minimum> <maximum> <1 = on , 0 = off>

in my task i want to change the amx_test cvar every 0.5 sec. to the numbers which my admin want. again a example :


Code:
Cvar                 Min.            Max.       ON/OFF
amx_haha           2               28               1
in task =

in first 0.5 sec. = amx_test 2
in sec. 0.5 sec. = amx_test 28
in third 0.5 sec. = amx_test 2
& ....
__________________

Last edited by One; 10-15-2009 at 10:55.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2009 , 12:41   Re: add new cvar for old concmd
Reply With Quote #2

Uh? amx_test isn't a cvar.
__________________
fysiks is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-14-2009 , 12:53   Re: add new cvar for old concmd
Reply With Quote #3

example? i writed 1 year ago a plugin & now i dont have the sma anymore & i dont want to rewrite the plug-in when i use this as script like :

amx_EXAMPLE 2;wait;amxEXAMPLE 20;wait...........

is a little bit silly & i cant do anything. i tough i can do it with a plugin to turning the plugin on/off.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2009 , 13:16   Re: add new cvar for old concmd
Reply With Quote #4

Quote:
Originally Posted by One View Post
example? i writed 1 year ago a plugin & now i dont have the sma anymore & i dont want to rewrite the plug-in when i use this as script like :

Code:
amx_EXAMPLE 2;wait;amxEXAMPLE 20;wait
is a little bit silly & i cant do anything. i tough i can do it with a plugin to turning the plugin on/off.
I still don't get it. What does your "missing sma" plugin do?
__________________
fysiks is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-14-2009 , 13:34   Re: add new cvar for old concmd
Reply With Quote #5

hmmm...

ok i say it with an example :Day light

i hope you know this plugin.
here we have a cvar = amx_light 0-28.

so i want to make a plugin which turns amx_light to that what i want in loop.

when i use amx_makelight 2 20 1 then my plugin changes cvar amx_light to 2 and after 0.5 sec. changes to amx_light 20. when i use amx_makelight 0, so is my loop off. (

i hope you understand. i dont know how to write it with examples
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 10-14-2009 , 13:46   Re: add new cvar for old concmd
Reply With Quote #6

set a looping task
increment a value
switch the value
__________________
minimiller is offline
Send a message via MSN to minimiller
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-14-2009 , 14:02   Re: add new cvar for old concmd
Reply With Quote #7

yay but i dont know how can i get the value :

amx_cvar <first.value> <secund.value> <ON/OFF>
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2009 , 14:35   Re: add new cvar for old concmd
Reply With Quote #8

I thought you assign the value.
__________________
fysiks is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-14-2009 , 14:38   Re: add new cvar for old concmd
Reply With Quote #9

all my admins can use this cvar.
idk which values they will use.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2009 , 14:55   Re: add new cvar for old concmd
Reply With Quote #10

Quote:
Originally Posted by One View Post
all my admins can use this cvar.
idk which values they will use.
From what you've told us, there is no cvar. Only a console command. There is no need to know what they use if it's a command that they input into console. In your new plugin just take them in as arguments then do the task thing.
__________________
fysiks is offline
Reply



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 22:42.


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