Raised This Month: $ Target: $400
 0% 

Checking secondary slot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-07-2009 , 18:04   Checking secondary slot
Reply With Quote #1

I want to be able to check if player has a secondary weapon

i.e
PHP Code:
if(!Has_Secondary(id))
{
    
//Display Menu

Another question on that is there a way to close the menu automatically after a certain amount of time?

Last edited by Doc-Holiday; 11-07-2009 at 18:17.
Doc-Holiday is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-07-2009 , 19:12   Re: Checking secondary slot
Reply With Quote #2

PHP Code:
#define EXTRAOFFSET_PLAYER    5
#define m_rgpPlayerItems_Slot2    369

bool:Has_Secondary(id)
{
    new 
iWeapon get_pdata_cbase(idm_rgpPlayerItems_Slot2EXTRAOFFSET_PLAYER)
    return 
bool:(iWeapon 0)

__________________
- 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 17:47.


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