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

Pen Pineapple Apple Pen C4 [PPAP C4]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-16-2016 , 10:57   Re: Pen Pineapple Apple Pen C4 [PPAP C4]
Reply With Quote #10

Quote:
Originally Posted by OciXCrom View Post

PS: I was wondering if there's a way to get the C4's integer after it has been planted? I'm currently using an invisible entity at the c4's position.
There are multiple ways, but a nice one would be:
PHP Code:
#if AMXX_VERSION_NUM < 183
const INT_BYTES 
const BYTE_BITS 

stock bool
:get_pdata_bool(entcharbased_offsetintbase_linuxdiff 5

    return !!(
get_pdata_int(entcharbased_offset INT_BYTESintbase_linuxdiff) & (0xFF<<((charbased_offset INT_BYTES) * BYTE_BITS))) 

#endif

const m_bIsC4     385    
new GrenadeEntity FM_NULLENT

while((GrenadeEntity engfunc(EngFunc_FindEntityByStringGrenadeEntity"classname""grenade")))
{
    if(
pev_valid(GrenadeEntity) && get_pdata_bool(GrenadeEntitym_bIsC4))
    {
        
//do your stuff
        
break
    }

After it's planted the classname is "grenade" and m_bIsC4 is set to true.
__________________

Last edited by HamletEagle; 12-16-2016 at 10:58.
HamletEagle 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 13:35.


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