View Single Post
Gh05t04
Senior Member
Join Date: Jul 2015
Old 08-15-2015 , 10:26   Re: [REQ] Block Weapons
Reply With Quote #8

Can someone help me with that?

EDIT:

This?

PHP Code:
#include <amxmodx> 
#include <engine> 
#include <cstrike> 
  
new bool:g_BlockPickup[33]; 
  
public 
plugin_init() 

        
register_plugin("Block Pickup""1.0""AMXX Community"); 
  
        
register_logevent"LogEvent_RoundEnd"2"1=Round_End");
        
register_logevent"LogEvent_RoundStart"2"1=Round_Start" );
  
        
register_touch("weaponbox""player""BlockPickup"); 
        
register_touch("armoury_entity""player""BlockPickup"); 
        
register_touch("weapon_shield""player""BlockPickup"); 


public 
LogEvent_RoundStart()
{
    
g_BlockPickup[id] = true
}

public 
LogEvent_RoundEnd(Client

    
SayBlock(Client

  
public 
client_putinserver(Client
        
g_BlockPickup[Client] = false
  
public 
SayBlock(Client
        if (
cs_get_user_team(Client) == CS_TEAM_T
                
g_BlockPickup[Client] = !g_BlockPickup[Client]; 
  
public 
BlockPickup(EntityClient
        return (
g_BlockPickup[Client] && cs_get_user_team(Client) == CS_TEAM_T) ? PLUGIN_HANDLED PLUGIN_CONTINUE

Last edited by Gh05t04; 08-15-2015 at 10:30.
Gh05t04 is offline