AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Restrict shield (https://forums.alliedmods.net/showthread.php?t=61639)

Alka 10-06-2007 08:31

Restrict shield
 
Hai. I try to restrict Ct's from pick up the shield...but this code is *not working...

*Note: If someone drop's the shield and i go right after that on him, is not picking up but next second is picking up :|...

Code:

public Fwd_Touch(Ent, id)
{
 static model[32], classname[32];
 
 pev(Ent, pev_classname, classname , sizeof classname - 1);
 pev(Ent, pev_model, model, sizeof model - 1);
 
 if(equali(classname, "weaponbox") && equali(model, "w_shield.mdl") && get_user_team(id) == 2)
  return FMRES_SUPERCEDE;
 
 return FMRES_IGNORED;
}

Thanks.

VEN 10-06-2007 08:42

Re: Restrict shield
 
if (equal(classname, "weapon_shield") && containi(model, "w_shield.mdl") != -1 && get_user_team(id) == 2)

Alka 10-06-2007 09:20

Re: Restrict shield
 
Huh, VEN :P, haven't saw you for a long time :D...anyway thanks, works!


All times are GMT -4. The time now is 16:03.

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