Raised This Month: $32 Target: $400
 8% 

[INC] Fakemeta Utilities [last update: 2007/01/08]


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-29-2009 , 02:05   Re: [INC] Fakemeta Utilities [last update: 2007/01/08]
Reply With Quote #171

And VEN never talked about linux for those offsets.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
karceWZROKIEM
Junior Member
Join Date: Sep 2008
Location: Poland
Old 10-29-2009 , 18:45   Re: [INC] Fakemeta Utilities [last update: 2007/01/08]
Reply With Quote #172

Quote:
Originally Posted by Arkshine View Post
By default get_pdata_int uses +5 as extra offset for linux.

Since this offset is related to the weapon, it would be +4.

Connor has tested and confirmed that it works fine with +4.
So there is a problem...
Because i've also tested and offset 4 is the wrong one... even if grenade is a weapon...
but offset is 5 , same as for player !!

Quote:
Originally Posted by Exolent[jNr] View Post
I would LOVE to see you prove VEN wrong.
VEN wasn't wrong...
He made this function for windows... and he didn't checked it for *nix...
__________________
"Smoking" or Drinking - THE Choice is Yours
I don't drink
karceWZROKIEM is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-29-2009 , 19:19   Re: [INC] Fakemeta Utilities [last update: 2007/01/08]
Reply With Quote #173

Yeah, you're right. ConnorMcLeod sucks we can't trust him. . Just tested and it should be 5 indeed.
__________________
Arkshine is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-30-2009 , 16:46   Re: [INC] Fakemeta Utilities [last update: 2007/01/08]
Reply With Quote #174

Either way, people really shouldn't be using this stuff except for the functions that you can't find anywhere else.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Old 05-14-2010, 11:50
nikeok_2010
This message has been deleted by Exolent[jNr]. Reason: Spambot
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2011 , 15:18   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #175

Quote:
Originally Posted by VEN View Post
The function gets what weapon type (CSW_*) a "grenade" entity is.
"grenade" entity is either the throwed grenade or the planted C4.

[...]
If you think something is incorrect or needs to be improved, feel free to post.
Code:
stock fm_cs_get_grenade_type(index) {     // you can comment/remove this     // if you are sure that the entity     // with the given index are valid     if (!pev_valid(index))         return 0     // you can comment/remove this     // if you are sure that the entity     // with the given index are "grenade"     new classname[9]     pev(index, pev_classname, classname, 8)     if (!equal(classname, "grenade"))         return 0     if (get_pdata_int(index, 96) & (1<<8))         return CSW_C4     new bits = get_pdata_int(index, 114)     if (bits & (1<<0))         return CSW_HEGRENADE     else if (bits & (1<<1))         return CSW_SMOKEGRENADE     else if (!bits)         return CSW_FLASHBANG     return 0 }
To clarify what does really theses offsets (and because I've checked today! ) :
  • 96 is related to C4 bomb planting/defusing and a generic name would be : m_fBombStatus

    • (1<<0) : Start defuse
    • (1<<8) : Bomb planted

  • 114 is related to grenades events and a generic name would be : m_usEvent

    • 0 : Flashbang : Since there is no event for that, value is null.
    • 1 : HE grenade ; value by default returned from PRECACHE_EVENT( 1, "events/createexplo.sc" )
    • 2 : Smoke grenade : value by default returned from PRECACHE_EVENT( 1, "events/createsmoke.sc" )

  • 114 is also related to smoke grenade specifically but since it's different and hard to find a global name for all flags, we better use another name : m_fSGStatus

    • (1<<24) : Smoke grenade detonated. (Set just before PlayBackEvent called)
    • (1<<16) : When a smoke grenade is thrown and when it's going to be detonated, if it finds another smoke grenade in the 250 units and not detonated yet, this flag is set. No idea what is changed, maybe how react the fog) (Used as param in PlayBackEvent)
__________________

Last edited by Arkshine; 11-09-2011 at 05:03. Reason: Flags reversed.
Arkshine is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-04-2011 , 15:36   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #176

Thanks for the clarification! Is it still Win32-only after looking through it, or did you find it can work in Linux as well?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Arkshine; 11-09-2011 at 05:03. Reason: Don't quote me !
Exolent[jNr] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2011 , 15:39   Re: [INC] Fakemeta Utilities [last update: 2007/01/08]
Reply With Quote #177

There is no offsets such as windows-only. I mean, if it exists under windows, it exists [obviously] under linux too. For "grenade" (CGrenade), the extra offset for linux is +5.
__________________

Last edited by Arkshine; 08-04-2011 at 18:18.
Arkshine is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-04-2011 , 18:48   Re: [INC] Fakemeta Utilities [last update: 2007/01/08]
Reply With Quote #178

Quote:
Originally Posted by Arkshine View Post
There is no offsets such as windows-only. I mean, if it exists under windows, it exists [obviously] under linux too. For "grenade" (CGrenade), the extra offset for linux is +5.
I expected that, but I figured VEN would've known that since he played around with offsets.
Thanks for confirming.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 19:48.


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