Raised This Month: $ Target: $400
 0% 

[REQ] Block Weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 08-16-2015 , 10:30   Re: [REQ] Block Weapons
Reply With Quote #11

Maybe this can help you:
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("round_end"2"1=Round_End")
        
register_logevent"RoundStart"2"1=Round_Start" )
  
        
register_touch("weaponbox""player""BlockPickup")
        
register_touch("armoury_entity""player""BlockPickup")
        
register_touch("weapon_shield""player""BlockPickup"


public 
round_end()
{
    static 
id;
    for(
id id <= get_maxplayers() ; id++)
    {
        if(!
is_user_alive(id))
            continue

        
SayBlock(id)
    }
}

public 
RoundStart()
{
    static 
id;
    for(
id id <= get_maxplayers() ; id++)
    {
        if(!
is_user_alive(id))
            continue

        
g_BlockPickup[id] = true
    
}
}
 
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
Or try this:
PHP Code:
public round_end()
{
        
arraysetg_BlockPickupfalsecharsmaxg_BlockPickup ) )


Last edited by Krtola; 08-16-2015 at 10:31.
Krtola is offline
Send a message via Skype™ to Krtola
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 10:50.


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