AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Say disable and enable (https://forums.alliedmods.net/showthread.php?t=113623)

Storas1337 12-28-2009 16:46

Say disable and enable
 
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.

fysiks 12-28-2009 16:51

Re: Say disable and enable
 
2 :arrow: 1

XLN's | [Lo]Phreak^n^c 12-29-2009 04:28

Re: Say disable and enable
 
this has almost the same functionality, i hope this code can help you
http://forums.alliedmods.net/showthread.php?t=95056 ?


All times are GMT -4. The time now is 04:08.

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