Raised This Month: $ Target: $400
 0% 

pls help me with a block script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amitsl
Junior Member
Join Date: Dec 2010
Old 01-06-2011 , 12:57   pls help me with a block script
Reply With Quote #1

PHP Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN    "Jailbreak Deathrun Basebuilder Command Blocker"
#define AUTHOR    "+ReUsE-`"
#define VERSION    "2.0"


new szPrefix[19] = "[BC]";        //Prefix or TAG for all client_chat mensagges

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_cvar("bc_blockbuy""1");                    // All buys Blocked
    
register_cvar("bc_blockradio""1");                // Block Radio commands
    
register_cvar("bc_blockchooseteam""1");// Block Choose Team
    
register_cvar("bc_crashcommands","1")
    
register_clcmd("bc_blockchat""cmd_chatmute", -1"<name>"// Muted Chat of a player. 
    
register_clcmd("bc_blockchatmenu""menu_chatmute", -1"chat mute menu"// Open Chat Mute Menu
    
register_concmd("say""say_handle")
    
register_concmd("say_team""say_handle")
    
register_dictionary "blockcommand.txt" );
    
maxplayers get_maxplayers() + 1
    SayText 
get_user_msgid("SayText")
    
register_cvar("bc_prefix"szPrefix);
    
    
//Block  All Buy and Buy Binds
    
if (get_cvar_num("bc_blockbuy"))
    {
        
register_clcmd("buy""bblocked");
        
register_clcmd("cl_autobuy""bblocked");
        
register_clcmd("cl_rebuy""bblocked");
        
register_clcmd("cl_setautobuy""bblocked");
        
register_clcmd("cl_setrebuy""bblocked");
        
        
register_clcmd("glock""bblocked");
        
register_clcmd("usp""bblocked");
        
register_clcmd("p228""bblocked");
        
register_clcmd("deagle""bblocked");
        
register_clcmd("elites""bblocked");
        
register_clcmd("fn57""bblocked");
        
        
register_clcmd("mp5""bblocked");
        
register_clcmd("smg""bblocked");
        
register_clcmd("mac10""bblocked");
        
register_clcmd("tmp""bblocked");
        
register_clcmd("ump45""bblocked");
        
register_clcmd("p90""bblocked");
        
        
register_clcmd("m3""bblocked");
        
register_clcmd("xm1014""bblocked");
        
        
register_clcmd("famas""bblocked");
        
register_clcmd("m4a1""bblocked");
        
register_clcmd("ak47""bblocked");
        
register_clcmd("sg552""bblocked");
        
register_clcmd("galil""bblocked"); 
        
register_clcmd("aug""bblocked");
        
        
register_clcmd("scout""bblocked");
        
register_clcmd("awp""bblocked");
        
register_clcmd("sg550""bblocked");
        
register_clcmd("g3sg1""bblocked");
        
        
register_clcmd("m249""bblocked");
        
        
register_clcmd("hegren""bblocked");
        
register_clcmd("flash""bblocked");
        
register_clcmd("sgren""bblocked");
        
register_clcmd("vest""bblocked");
        
register_clcmd("vesthelm""bblocked");
        
register_clcmd("shield""bblocked");
        
register_clcmd("buyammo1""bblocked");
        
register_clcmd("buyammo1""bblocked");
        
register_clcmd("buyequip""bblocked");
    }
    
    
//Block Radio Commands
    
if (get_cvar_num("bc_blockradio"))
    {
        
register_clcmd("radio1""rblocked");
        
register_clcmd("radio2""rblocked");
        
register_clcmd("radio3""rblocked");
        
register_clcmd("coverme""rblocked")
        
register_clcmd("takepoint""rblocked")
        
register_clcmd("holdpos""rblocked")
        
register_clcmd("regroup""rblocked")
        
register_clcmd("followme""rblocked")
        
register_clcmd("takingfire""rblocked")
        
register_clcmd("go""rblocked")
        
register_clcmd("fallback""rblocked")
        
register_clcmd("sticktog""rblocked")
        
register_clcmd("getinpos""rblocked")
        
register_clcmd("stormfront""rblocked")
        
register_clcmd("report""rblocked")
        
register_clcmd("roger""rblocked")
        
register_clcmd("enemyspot""rblocked")
        
register_clcmd("needbackup""rblocked")
        
register_clcmd("sectorclear""rblocked")
        
register_clcmd("inposition""rblocked")
        
register_clcmd("reportingin""rblocked")
        
register_clcmd("getout""rblocked")
        
register_clcmd("negative""rblocked")
        
register_clcmd("enemydown""rblocked")
    }
    
    
//Block Choose Team
    
if (get_cvar_num("bc_blockchooseteam"))
    {
        
register_clcmd("chooseteam""ctblocked");
        
register_clcmd("jointeam""ctblockerd");
        
register_clcmd("jointeam 2""ctblocked");
        
register_clcmd("jointeamCT""ctblocked");
    }
    
//Blockcrash
    
if (get_cvar_num("bc_crashcommands"))
    {
        
register_clcmd("say timeleft""crashblock")
        
register_clcmd("say nextmap""crashblock")
        
register_clcmd("say /admin""crashblock")
        
register_clcmd("say /spec""crashblock")
    
//Block retry
    
if (get_cvar_num("bc_blockretry"))
    {
        
register_clcmd("retry""blockr");
    }
}

public 
bblocked(id)
    {
    
ColorChat(id,GREEN"%L"id"BLOCK_BUY"szPrefix);
    return 
PLUGIN_HANDLED
    
}
    
public 
rblocked(id)
    {
    
ColorChat(id,GREEN"%L"id"BLOCK_RADIO"szPrefix);
    return 
PLUGIN_HANDLED
    
}
    
public 
ctblocked(id)
    {
    
ColorChat(id,GREEN"%L"id"BLOCK_CHOOSETEAM"szPrefix);
    return 
PLUGIN_HANDLED
    
}

public 
crashblock(id)
    {
    
ColorChat(id,red"%L"id"BLOCK_CRASH"szPrefix);
    return 
PLUGIN_HANDLED
    

and i make a lang file {.txt}
in date/lang/
PHP Code:
[en]
BLOCK_BUY = %s Buy and Buy Bind's are Blocked.
BLOCK_CHOOSETEAM = %s Choose Team are Blocked.
BLOCK_RADIO = %s Radio Commands are Blocked.
MUTE_UNMUTE = Un
MUTE_CHAT = [BC] %s chat is now %smuted for you.
MUTE_ADMIN = [BC] You cannot mute an admin.
BLOCK_CRASH = [+ReUsE-`] Don'
try to crash our server doesn't work in here :D
BLOCK_RETRY = [+ReUsE-`] Don'
try to revive yourslef by doing retry  :D
[es]
BLOCK_BUY = %s La compra y Uso de bind's de compra estan bloqueadas.
BLOCK_CHOOSETEAM = %s Cambiarte de equipo no esta permitido en el server.
BLOCK_RADIO = %s Los comandos de radio no estan permitidos en el server.
MUTE_UNMUTE = Des
MUTE_CHAT = [BC] Ahora el chat de %s esta %s
MUTE_ADMIN = [BC] No podes mutear el chat de un admin. 

Last edited by amitsl; 01-06-2011 at 13:04.
amitsl is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-06-2011 , 12:59   Re: pls help me with a block script
Reply With Quote #2

What a wonderful script you have there. How would you like your help today, sir?
SnoW is offline
Send a message via MSN to SnoW
amitsl
Junior Member
Join Date: Dec 2010
Old 01-06-2011 , 13:15   Re: pls help me with a block script
Reply With Quote #3

can you fix that?
pls
some body
fix that
amitsl is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 01-06-2011 , 13:29   Re: pls help me with a block script
Reply With Quote #4

Quote:
Originally Posted by amitsl View Post
can you fix that?
pls
some body
fix that
It would be much easier to fix if you could tell us what's wrong, or not working...

Use AMXX Studio and it's not hard to debug by yourself.

You forgot to include colorchat

Some variables were not initialised, and weren't used either.

You forgot a closing brace.

Simple, easy to fix mistakes.

Here's a version that will at least compile. I copied the colorchat stocks into the plugin so it works with the webcompiler.
Attached Files
File Type: sma Get Plugin or Get Source (blah.sma - 655 views - 7.0 KB)
Elusive138 is offline
amitsl
Junior Member
Join Date: Dec 2010
Old 01-06-2011 , 16:59   Re: pls help me with a block script
Reply With Quote #5

this is dosent work
its dosent block /admin
timeleft
nextmap
why?
amitsl is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 01-06-2011 , 17:15   Re: pls help me with a block script
Reply With Quote #6

try adding the plugin on top of your plugins.ini
__________________
Impossible is Nothing
Sylwester is offline
amitsl
Junior Member
Join Date: Dec 2010
Old 01-07-2011 , 05:33   Re: pls help me with a block script
Reply With Quote #7

in other server its work but not in my...
why?
amitsl 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 02:02.


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