AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to add a Costum FLAG to no_chatting.amx ? (https://forums.alliedmods.net/showthread.php?t=47709)

Varden 11-24-2006 14:51

How to add a Costum FLAG to no_chatting.amx ?
 
Please help me... who knows how to add a costum flag to this plugin PHP Code:
#include <amxmod>
public hook_say()
{
if (
get_cvar_num("blocksay"))
return
PLUGIN_HANDLED

return PLUGIN_CONTINUE
}

public plugin_init()
{
register_plugin("block say", "1", "Petey B")
register_clcmd("say", "hook_say")
register_clcmd("say_team", "hook_say")
register_cvar("blocksay","1")
}

SweatyBanana 11-24-2006 21:49

Re: How to add a Costum FLAG to no_chatting.amx ?
 
Magic.

=|[76AD]|= TatsuSaisei 11-28-2006 06:52

Re: How to add a Costum FLAG to no_chatting.amx ?
 
Quote:

Originally Posted by Varden (Post 406819)
Please help me... who knows how to add a costum flag to this plugin PHP Code:
#include <amxmod>
public hook_say()
{
if (get_cvar_num("blocksay"))
return PLUGIN_HANDLED


return PLUGIN_CONTINUE
}

public plugin_init()
{
register_plugin("block say", "1", "Petey B")
register_clcmd("say", "hook_say")
register_clcmd("say_team", "hook_say")
register_cvar("blocksay","1")

}

Code:


public hook_say(id)
{
if (get_cvar_num("blocksay") && get_user_flags(id) != ADMIN_LEVEL_B )
return PLUGIN_HANDLED
 
return PLUGIN_CONTINUE
}
 
public plugin_init()
{
register_plugin("block say", "1", "Petey B")
register_clcmd("say", "hook_say")
register_clcmd("say_team", "hook_say")
register_cvar("blocksay","1")
}



All times are GMT -4. The time now is 06:59.

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