Raised This Month: $ Target: $400
 0% 

Say disable and enable


Post New Thread Reply   
 
Thread Tools Display Modes
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
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-28-2009 , 16:51   Re: Say disable and enable
Reply With Quote #2

2 1
__________________
fysiks is offline
XLN's | [Lo]Phreak^n^c
Senior Member
Join Date: May 2006
Location: Argentina
Old 12-29-2009 , 04:28   Re: Say disable and enable
Reply With Quote #3

this has almost the same functionality, i hope this code can help you
http://forums.alliedmods.net/showthread.php?t=95056 ?
__________________
::: If u're 555 then I'm 666 :::

Last edited by XLN's | [Lo]Phreak^n^c; 12-29-2009 at 04:30.
XLN's | [Lo]Phreak^n^c 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 04:08.


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