Raised This Month: $ Target: $400
 0% 

Block cts from taking weapons from ground.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 02-03-2010 , 06:12   Block cts from taking weapons from ground.
Reply With Quote #1

I need to block CT's from taking weapons from ground, Ive tried this:
But it have bugs, it block CT's taking weapons that they throw, but they can pick up weapons that map spawns or that other players drop.

PHP Code:
  RegisterHam(Ham_Touch"weaponbox""fw_TouchWeapon"
PHP Code:
public fw_TouchWeapon(weaponid
{
  if (
cs_get_user_team(id) == CS_TEAM_CT
   return 
HAM_SUPERCEDE

    return 
HAM_IGNORED

__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
reinert
Veteran Member
Join Date: Feb 2007
Old 02-03-2010 , 09:08   Re: Block cts from taking weapons from ground.
Reply With Quote #2

it may be helpful, just add all weapon models there .

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>

public plugin_init()
   
register_forward(FM_Touch"wp_touch");

public 
wp_touch(entid)
{
   if(!
pev_valid(ent) || !pev_valid(id) || !is_user_alive(id))
      return 
FMRES_IGNORED
   
   
static CsTeamsteam team cs_get_user_team(id)
   new 
mdl[32]
   
   
pev(entpev_modelmdl31)
   
   if(
team == CS_TEAM_T)
   {
      if(
equal(mdl"models/w_m4a1.mdl") || equal(mdl"models/w_usp.mdl"))
         return 
FMRES_SUPERCEDE
   
}
   return 
FMRES_IGNORED

reinert 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 07:25.


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