Raised This Month: $ Target: $400
 0% 

Cvar Plugin CFG


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-17-2010 , 20:33   Cvar Plugin CFG
Reply With Quote #1

I want to be able to modify my plugin with a cvar. So, if the cvar is in 1, the plugin will still run with amx_off. If the cvar is 0, it won't.

I already tried this, but didn't worked

PHP Code:
mix register_cvar("totalcs_mix","0")

public 
plugin_cfg() {
    if(
get_pcvar_num(mix)==1){
        if(
is_plugin_loaded("Pause Plugins") != -1)
        
server_cmd("amx_pausecfg add ^"%s^""PLUGIN)
    }

totalcsscripting is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 08-17-2010 , 20:57   Re: Cvar Plugin CFG
Reply With Quote #2

u know that if amx is off then no plugin for amxx can run ?
platzpatrone is offline
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-17-2010 , 21:35   Re: Cvar Plugin CFG
Reply With Quote #3

Quote:
Originally Posted by platzpatrone View Post
u know that if amx is off then no plugin for amxx can run ?

You are wrong.
totalcsscripting is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-17-2010 , 22:57   Re: Cvar Plugin CFG
Reply With Quote #4

Quote:
Originally Posted by platzpatrone View Post
u know that if amx is off then no plugin for amxx can run ?
You know that admin commands (from amxx default) are plugin? then why amx_on work when amx is off?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 08-17-2010 , 23:11   Re: Cvar Plugin CFG
Reply With Quote #5

Quote:
Originally Posted by totalcsscripting View Post
I want to be able to modify my plugin with a cvar. So, if the cvar is in 1, the plugin will still run with amx_off. If the cvar is 0, it won't.

I already tried this, but didn't worked

PHP Code:
mix register_cvar("totalcs_mix","0")

public 
plugin_cfg() {
    if(
get_pcvar_num(mix)==1){
        if(
is_plugin_loaded("Pause Plugins") != -1)
        
server_cmd("amx_pausecfg add ^"%s^""PLUGIN)
    }

Thats write the plugin.cfg,you must delete it.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-17-2010 , 23:15   Re: Cvar Plugin CFG
Reply With Quote #6

Quote:
Originally Posted by #8 SickneSS View Post
Thats write the plugin.cfg,you must delete it.
I ndon't understand what did you said.

I want that my plugin can run with amx_off just like mixmaker but i want to gave the admin the posibility of choosing.
totalcsscripting is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-17-2010 , 23:20   Re: Cvar Plugin CFG
Reply With Quote #7

Quote:
Originally Posted by platzpatrone View Post
u know that if amx is off then no plugin for amxx can run ?
That is incorrect.
Quote:
Originally Posted by totalcsscripting View Post
You are wrong.
That is correct.
Quote:
Originally Posted by #8 SickneSS View Post
Thats write the plugin.cfg,you must delete it.
That is incorrect. You don't know what you are talking about.
Quote:
Originally Posted by totalcsscripting View Post
I ndon't understand what did you said.
He does not know what he is talking about.

So, probably the best solution is to remake the amx_off command to exclude certain plugins from the pausing process. Or, make an alternative to amx_off.
__________________
fysiks is offline
totalcsscripting
BANNED
Join Date: Jul 2010
Old 08-17-2010 , 23:27   Re: Cvar Plugin CFG
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
That is incorrect.

That is correct.

That is incorrect. You don't know what you are talking about.

He does not know what he is talking about.

So, probably the best solution is to remake the amx_off command to exclude certain plugins from the pausing process. Or, make an alternative to amx_off.
PHP Code:
public plugin_cfg() {
    if(
is_plugin_loaded("Pause Plugins") != -1){
            
server_cmd("amx_pausecfg add ^"%s^""PLUGIN)
    }
        

I think we all now that adding this to my plugin, it wont stop with amx_off.

Well, i want to be able to set the posibility of execute this function with a cvar.

If the cvar is 1, it wont stop. if it is 0 it will stop
totalcsscripting is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 08-17-2010 , 23:34   Re: Cvar Plugin CFG
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
That is incorrect. You don't know what you are talking about.
Thats doesn't edit the pauseplugins.cfg ? Sorry
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 08-17-2010 , 23:36   Re: Cvar Plugin CFG
Reply With Quote #10

damn, my fault i read it wrong, i read it that he mean amxx off -> comment them in metamods plugin.ini so it is totally deactivated, damn, sorry.
platzpatrone 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 21:56.


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