Raised This Month: $12 Target: $400
 3% 

best way to catch when player shoots a nade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 07-12-2012 , 10:23   best way to catch when player shoots a nade
Reply With Quote #1

tittle.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-12-2012 , 11:35   Re: best way to catch when player shoots a nade
Reply With Quote #2

Code:
#include <csx> public grenade_throw(client, ent, weap) {     if (weap == CSW_HEGRENADE)     {         // Etc     } }
hleV is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-12-2012 , 13:11   Re: best way to catch when player shoots a nade
Reply With Quote #3

When a player "throws" a nade, or when you try to attack a nade?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 07-12-2012 , 14:18   Re: best way to catch when player shoots a nade
Reply With Quote #4

ty hlev.
when the player throws the nade.
wanted to cache attack & check if user has a nade :-P haha
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 07-15-2012 , 07:16   Re: best way to catch when player shoots a nade
Reply With Quote #5

ehemmm. sry 4 double post.
i think i forgot all about amxxxx....

knows anyone whats here the problem ?

PHP Code:
public grenade_throw(identweap)
{
    if (
weap == CSW_HEGRENADE && nadewars == )//&& cs_get_user_team(id) == CS_TEAM_T)
    
{
        
set_task(3.0,"give_nade",id)
    }
}    
public 
give_nade(id)
{
    if(
is_user_alive(id))
    {
        
give_item(id"weapon_hergrenade" )
    }
    
client_print(id,print_chat,"DEBUG : TASK WORKS. YOU GOT 1 HE")

problem : user dosent get any HEs.. my task/debug print works.

tried with fm_give_item too but the same :

PHP Code:
stock fm_give_item(id,const item[]){
    static 
ent;
    
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem));
    if(!
pev_valid(ent)) return;
   
    static 
Float:originF[3];
    
pev(idpev_originoriginF);
    
set_pev(entpev_originoriginF);
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN);
    
dllfunc(DLLFunc_Spawnent);
   
    static 
save;
    
save pev(entpev_solid);
    
dllfunc(DLLFunc_Touchentid);
    if(
pev(ent,pev_solid) != save)
        return;
      
    
engfunc(EngFunc_RemoveEntityent);

__________________

Last edited by One; 07-15-2012 at 07:16.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-15-2012 , 07:17   Re: best way to catch when player shoots a nade
Reply With Quote #6

weapon_hergrenade
__________________
<VeCo> is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 07-15-2012 , 07:19   Re: best way to catch when player shoots a nade
Reply With Quote #7

hahaha =)))

i will try it again. i tested it with m4a1 but ...
ill post the resault. ty
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-15-2012 , 07:23   Re: best way to catch when player shoots a nade
Reply With Quote #8

Do NEVER use fm_ stuff.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 07-15-2012 , 10:18   Re: best way to catch when player shoots a nade
Reply With Quote #9

hmmm. its now workin. ty

oki connor. was just a test
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Reply


Thread Tools
Display Modes

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 22:19.


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