View Single Post
Xvil
BANNED
Join Date: Feb 2012
Old 03-14-2012 , 08:23   Re: How to block some commands on a Specific map?
Reply With Quote #4

This an Example to block The Buy Commands command:

PHP Code:
new const gBuyCommands[ ][ ] =
{
        
"usp""glock""deagle""p228""elites",
        
"fn57""m3""xm1014""mp5""tmp""p90",
        
"mac10""ump45""ak47""galil""famas",
        
"sg552""m4a1""aug""scout""awp""g3sg1",
        
"sg550""m249""vest""vesthelm""flash",
        
"hegren""sgren""defuser""nvgs""shield",
        
"primammo""secammo""km45""9x19mm""nighthawk",
        
"228compact""fiveseven""12gauge""autoshotgun",
        
"mp""c90""cv47""defender""clarion""krieg552",
        
"bullpup""magnum""d3au1""krieg550"
        
"buy""buyammo1""buyammo2""buyequip""cl_autobuy",
        
"cl_rebuy""cl_setautobuy""cl_setrebuy"
}
public 
plugin_init() 

    
register_plugin("Block Buy Example""0.1.0""Xvil"

    for (new 
isizeof gBuyCommandsi++) 
        
register_clcmd(gBuyCommands[i], "BlockBuyCommands"


public 
BlockBuyCommands(id
{
    
// Block the buy commands. 
    
return PLUGIN_HANDLED

Xvil is offline