Raised This Month: $ Target: $400
 0% 

How check player bullet are her shoot it?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
spag
Junior Member
Join Date: Feb 2013
Old 01-09-2014 , 13:33   How check player bullet are her shoot it?
Reply With Quote #1

How check player bullet are her shoot it?

I need start any task, when player have 1 bullet and remove task, when he shoot it, but i don't know how, please help..

Code:
public Ham_DeagleFire_Post(iEnt)
{
    if (g_iCurrentGame != LR_S4S)
    {
        return;
    }
   
    new id = pev(iEnt, pev_owner);
    new iOpponentEnt;
   
    if (cs_get_weapon_ammo(iEnt) == 0)
    {
        if (id == g_iLastRequest[LR_PRISONER])
        {
            iOpponentEnt = fm_find_ent_by_owner(-1, "weapon_deagle", g_iLastRequest[LR_GUARD]);
           
            if (pev_valid(iOpponentEnt))
            {
                cs_set_weapon_ammo(iOpponentEnt, 1);
            }
        }
       
        else if (id == g_iLastRequest[LR_GUARD])
        {
            iOpponentEnt = fm_find_ent_by_owner(-1, "weapon_deagle", g_iLastRequest[LR_PRISONER]);
           
            if (pev_valid(iOpponentEnt))
            {
                cs_set_weapon_ammo(iOpponentEnt, 1);
            }
        }
    }
}
spag is offline
 



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 10:08.


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