Raised This Month: $ Target: $400
 0% 

best way to catch when player shoots a nade


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


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 18:33.


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