Raised This Month: $ Target: $400
 0% 

Touch armoury_entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wwzw
Member
Join Date: Feb 2009
Old 02-08-2012 , 02:29   Re: Touch armoury_entity
Reply With Quote #1

Quote:
Originally Posted by ConnorMcLeod View Post
I think backpackammo is given when you pickup an armoury_entity but no number is stored into the armoury, whatever the map, when you pickup up an m3, same amount of clip and ammo are given.

Don't remove entities, set pev_effect to EF_NODRAW (that's what's happening when you pickup the weapon).
Thank you very much!
I tested the code is successful:

PHP Code:
public Ham_Touch_entity_Pre(ent,id)
{
 if (
id || id max_player || (!is_user_alive(id)) || ent <= max_player || (!pev_valid(ent)))
  return 
HAM_IGNORED;
 if (
pev(ent,pev_effects) == EF_NODRAW) return HAM_IGNORED;
 new 
wid cs_get_armoury_type(ent);
 
 
//Give player weapon...
 
 
set_pev(ent,pev_effects,EF_NODRAW);
 return 
HAM_SUPERCEDE;
 


Last edited by wwzw; 02-08-2012 at 02:30.
wwzw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-08-2012 , 02:45   Re: Touch armoury_entity
Reply With Quote #2

Btw, ent <= max_player check is not needed, you have registerer the armoury classname.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 00:21.


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