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

[Info] Counter-Strike pvPrivateData offsets


Post New Thread Reply   
 
Thread Tools Display Modes
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-27-2009 , 15:00   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #91

Someone found m_ls.sUnlockedSound ? (CBaseButton), in wiki its empty
__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-27-2009 , 17:25   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #92

Quote:
Originally Posted by xPaw View Post
Someone found m_ls.sUnlockedSound ? (CBaseButton), in wiki its empty
Try around 76
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-27-2009 , 18:32   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #93

Quote:
Originally Posted by xPaw View Post
Someone found m_ls.sUnlockedSound ? (CBaseButton), in wiki its empty
I've updated a bit http://wiki.alliedmods.net/CBaseButton_(CS).

I'm almost sure for 73 -> 79 and 86. Others not sure.

So m_ls.sUnlockedSound is 78 here. ( tested )
__________________
Arkshine is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-27-2009 , 23:13   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #94

About the m_ls.sUnlockedSound:
xPaw showed me some code about it, and it is the string allocated:
m_ls.sUnlockedSound = ALLOC_STRING(pszSound);
Therefore, the value is an integer. I don't know if it's the same as using EngFunc_AllocString, but shouldn't the string be retrieved with global_get( glb_pStringBase, ... ) ?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-28-2009 , 00:42   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #95

Quote:
Originally Posted by Exolent[jNr] View Post
About the m_ls.sUnlockedSound:
xPaw showed me some code about it, and it is the string allocated:
m_ls.sUnlockedSound = ALLOC_STRING(pszSound);
Therefore, the value is an integer. I don't know if it's the same as using EngFunc_AllocString, but shouldn't the string be retrieved with global_get( glb_pStringBase, ... ) ?
Exactly, or also : eng_get_string(_string, _returnString[], _len)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-28-2009 , 01:36   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #96

Quote:
Originally Posted by ConnorMcLeod View Post
Exactly, or also : eng_get_string(_string, _returnString[], _len)
I wasn't aware of that function. It isn't even in the funcwiki on amxmodx.org
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-28-2009 , 04:49   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #97

Its engine function.

PHP Code:
/* Converts a string offset into a real string. Some of the forwards in fakemeta
   uses string offsets. (FM_CreateNamedEntity) */
native eng_get_string(_string_returnString[], _len); 
__________________
xPaw is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-02-2009 , 10:02   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #98

Quote:
Originally Posted by ConnorMcLeod View Post
If it can hepls you, that's how i found ambien_generic offsets values :

Create a ambient_generic entity with specifi values that will be easy to identify later.
Then, dump all offsets values after Spawn forward.
At last, compare the dumped file with values i've set, look at HLSDK (dlls/sound.cpp) for offsets names.
PHP Code:
/*    Copyright © 2009, ConnorMcLeod

    Ambien Generic Test is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Ambien Generic Test; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Ambien Generic Test"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

public plugin_precache()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Spawn"ambien_generic""CAmbientGeneric_Spawn")

    
create_ambient()

}

stock create_ambient()
{
    new 
iEnt

    iEnt 
engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "ambient_generic" ) )

    
set_pev(iEntpev_message"ambience/lv_jubilee.wav")

    
    
SetKeyValue(iEnt"preset""0""ambient_generic")

    
SetKeyValue(iEnt"pitch""95""ambient_generic")
    
SetKeyValue(iEnt"pitchstart""91""ambient_generic")
    
SetKeyValue(iEnt"spinup""13""ambient_generic")
    
SetKeyValue(iEnt"spindown""17""ambient_generic")

    
SetKeyValue(iEnt"health""9""ambient_generic")    
    
SetKeyValue(iEnt"volstart""8""ambient_generic")
    
SetKeyValue(iEnt"fadein""24""ambient_generic")
    
SetKeyValue(iEnt"fadeout""26""ambient_generic")

    
SetKeyValue(iEnt"lfotype""3""ambient_generic")
    
SetKeyValue(iEnt"lforate""777""ambient_generic")

    
SetKeyValue(iEnt"lfomodpitch""71""ambient_generic")
    
SetKeyValue(iEnt"lfomodvol""69""ambient_generic")

    
SetKeyValue(iEnt"cspinup""4""ambient_generic")

    
SetKeyValue(iEnt"spawnflags""32""ambient_generic")



    
ExecuteHamB(Ham_SpawniEnt)
}

/*#define AMBIENT_SOUND_STATIC            0    // medium radius attenuation
#define AMBIENT_SOUND_EVERYWHERE        1
#define AMBIENT_SOUND_SMALLRADIUS        2
#define AMBIENT_SOUND_MEDIUMRADIUS        4
#define AMBIENT_SOUND_LARGERADIUS        8
#define AMBIENT_SOUND_START_SILENT        16
#define AMBIENT_SOUND_NOT_LOOPING        32*/

public CAmbientGeneric_SpawniEnt )
{
    
dumpiEnt )
}

dumpiEnt )
{
    static 
logfile[192], fp
    
if(logfile[0] == 0)
    {
        new 
basedir[64], date[16]
        
get_localinfo("amxx_basedir"basedircharsmax(basedir))
        
get_time("%m%d"datecharsmax(date))
        
formatex(logfilecharsmax(logfile), "%s/logs/CAmbientGeneric_%s.log"basedirdate)
    }

    
fp fopen(logfile"a")

    static 
Float:flTime flTime get_gametime()

    static 
szBuffer[64], iOffSetiCbaseFloat:flOffsetnszOffset[128]
    for(new 
i=0i<=1024i++)
    {
        
0
        iOffSet 
get_pdata_int(iEnt,i)
        
iCbase get_pdata_cbase_safe(iEnti)
        
flOffset get_pdata_float(iEnt,i)
        
get_pdata_string(iEntiszOffset12714)
        
        
+= formatex(szBuffer[n], charsmax(szBuffer)-n"^nEnt(%d) #%i: "iEnti)

        
        if( 
iCbase > -)
        {
            
+= formatex(szBuffer[n], charsmax(szBuffer)-n"Cbase<%d>"iCbase)
        }

        
+= formatex(szBuffer[n], charsmax(szBuffer)-n"Int<%d>"iOffSet)

        
+= formatex(szBuffer[n], charsmax(szBuffer)-n"Float<%f><%.3f>"flOffsetflTime)

        
+= formatex(szBuffer[n], charsmax(szBuffer)-n"<%s>"szOffset)

        
fprintf(fpszBuffer)
    }    
    
fclose(fp)
}

stock SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[])
{
    
set_kvd(0KV_ClassNameszClassName)
    
set_kvd(0KV_KeyNameszKey)
    
set_kvd(0KV_ValueszValue)
    
set_kvd(0KV_fHandled0)
    
dllfunc(DLLFunc_KeyValueiEnt0)

Connor, I have used this code to check the offsets of "grenade" entity but no luck. I did the proper modifications and when I throw a nade it basically crashes the server. Is there another method to find offsets?
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-02-2009 , 10:15   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #99

Just do a dump of all offsets at the time you want on the grenade class.
__________________
Arkshine is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-02-2009 , 10:26   Re: [Info] Counter-Strike pvPrivateData offsets
Reply With Quote #100

Quote:
Originally Posted by Arkshine View Post
Just do a dump of all offsets at the time you want on the grenade class.
I did that by hooking with Ham_Spawn or with FM_SetModel. Will try more...
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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 00:54.


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