Raised This Month: $ Target: $400
 0% 

enabled


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zombieplague
Veteran Member
Join Date: Apr 2009
Old 03-20-2010 , 05:11   enabled
Reply With Quote #1

How do i enabled this ?

PHP Code:
#include < amxmodx >
#include < amxmisc >

new g_PluginEnabled
new toggle

public plugin_init( )
{
    if ( !
g_PluginEnabled ) return;
    
register_plugin"PLUGIN" "VERSION""AUTHOR" )
    
register_concmd"lol_toggle""Toggle"_"< 1 | 0 > - Enable | Disable lol")
}

public 
plugin_precache( )
{
    
cvar_toggle register_cvar"sd_on""1" )
    if ( !
get_pcvar_numtoggle ) ) return;
    
g_PluginEnabled true
}

public 
Toggleidlevelcid )
{
    if ( !
cmd_accessidlevelcid) )
    {
        return 
PLUGIN_HANDLED
    
}
 
    new 
arg]
    
read_argv1argcharsmaxarg ) )
 
    if ( 
str_to_numarg ) == g_PluginEnabled )
             return 
PLUGIN_HANDLED;
 
    
set_pcvar_numtogglestr_to_numarg ) )
 
    new 
mapname32 ]
    
get_mapnamemapnamecharsmaxmapname ) )
 
    
server_cmd"changelevel %s"mapname )
 
    return 
PLUGIN_HANDLED;

I want to type lol_toogle to on and off how ?
zombieplague is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 03-20-2010 , 08:52   Re: enabled
Reply With Quote #2

PHP Code:
if ( str_to_numarg ) == g_PluginEnabled )
             return 
PLUGIN_HANDLED
Try to remove this.
dFF is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 03-20-2010 , 11:40   Re: enabled
Reply With Quote #3

Quote:
Originally Posted by dFF View Post
PHP Code:
if ( str_to_numarg ) == g_PluginEnabled )
             return 
PLUGIN_HANDLED
Try to remove this.
Thanks, how do make if the plugin have enabled and you type lol_toggle don't have any effect. instead of enabled then lol_toggle passes again
zombieplague 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 08:37.


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