Raised This Month: $ Target: $400
 0% 

Say disable and enable


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Storas1337
Senior Member
Join Date: Apr 2009
Location: Lithuania
Old 12-28-2009 , 16:46   Say disable and enable
Reply With Quote #1

Hello im making plugin
With cvar admin enable and disable SAY(command y) (teamsay didnt touched)


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

new bool:g_eventSay = true

public plugin_init()
{
    register_plugin("Message Block", "1.0", "aZT")

    register_concmd("son", "dmb_on", ADMIN_ADMIN)
    register_concmd("soff", "dmb_off", ADMIN_ADMIN)
    register_clcmd("say", "event_say")
}

public dmb_on(id, level, cid)
{
    if (!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    client_print(id, print_chat, "Say komanda ijungta")
    g_eventSay = true

    return PLUGIN_CONTINUE
}

public dmb_off(id, level, cid)
{
    if (!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    client_print(id, print_chat, "Say isjungtas galite naudotis tik team_say")
    g_eventSay = false

    return PLUGIN_CONTINUE
}

public event_say()
{
    if (g_eventSay == true)
    {
        return PLUGIN_HANDLED
    }

    return PLUGIN_CONTINUE
}
when i trying turn on SAY(son) it continiuos disabled please help fix it.
Storas1337 is offline
 



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 04:08.


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