Моделлер
Участник
Пользователь
- Сообщения
- 1,543
- Реакции
- 1,543
- Предупреждения
- 1
- Помог
- 2 раз(а)
В 2012 году всеми нами знакомый товарищ ConnorMcLeod из AlliedModders ( возможно даже кому-то из нас и больше,чем знакомый ) опубликовал интересный и весьма полезный пост инклудов со всеми возможными оффсетами
В своё время они меня выручали ещё как.
Да, можно было бы загнать всё в один инклуд...но для удобства они розбросаны в 13 инклудов
И так - начнём...
Если вы используете что-то из всего этого, вы можете включить их следующим образом:
Источник
На этом всё - Благодарю за Внимание
cstrike_pdatas
В своё время они меня выручали ещё как.
Да, можно было бы загнать всё в один инклуд...но для удобства они розбросаны в 13 инклудов
И так - начнём...
Код:
#if defined _pdatas_stocks_included
#endinput
#endif
#define _pdatas_stocks_included
#include <fakemeta>
#define SHORT_BYTES 2
#define INT_BYTES 4
#define BYTE_BITS 8
stock get_pdata_char(ent, charbased_offset, intbase_linuxdiff = 5)
{
return ( get_pdata_int(ent, charbased_offset / INT_BYTES, intbase_linuxdiff)>>>((charbased_offset % INT_BYTES) * BYTE_BITS) ) & 0xFF
}
stock bool:get_pdata_bool(ent, charbased_offset, intbase_linuxdiff = 5)
{
return !!( get_pdata_int(ent, charbased_offset / INT_BYTES, intbase_linuxdiff) & (0xFF<<((charbased_offset % INT_BYTES) * BYTE_BITS)) )
}
stock set_pdata_char(ent, charbased_offset, value, intbase_linuxdiff = 5)
{
value &= 0xFF
new int_offset_value = get_pdata_int(ent, charbased_offset / INT_BYTES, intbase_linuxdiff)
new bit_decal = (charbased_offset % INT_BYTES) * BYTE_BITS
int_offset_value &= ~(0xFF<<bit_decal) // clear byte
int_offset_value |= value<<bit_decal
set_pdata_int(ent, charbased_offset / INT_BYTES, int_offset_value, intbase_linuxdiff)
return 1
}
stock set_pdata_bool(ent, charbased_offset, bool:value, intbase_linuxdiff = 5)
{
set_pdata_char(ent, charbased_offset, _:value, intbase_linuxdiff)
}
stock get_pdata_short(ent, shortbased_offset, intbase_linuxdiff = 5)
{
return ( get_pdata_int(ent, shortbased_offset / SHORT_BYTES, intbase_linuxdiff)>>>((shortbased_offset % SHORT_BYTES) * BYTE_BITS) ) & 0xFFFF
}
stock set_pdata_short(ent, shortbased_offset, value, intbase_linuxdiff = 5)
{
value &= 0xFFFF
new int_offset_value = get_pdata_int(ent, shortbased_offset / SHORT_BYTES, intbase_linuxdiff)
new bit_decal = (shortbased_offset % SHORT_BYTES) * BYTE_BITS
int_offset_value &= ~(0xFFFF<<bit_decal) // clear byte
int_offset_value |= value<<bit_decal
set_pdata_int(ent, shortbased_offset / SHORT_BYTES, int_offset_value, intbase_linuxdiff)
return 1
}
stock get_pdata_vector(ent, const vec_offsets[3], Float:dest[3], intbase_linuxdiff)
{
static i
for(i=0; i<3; i++)
{
dest[i] = get_pdata_float(ent, vec_offsets[i], intbase_linuxdiff)
}
}
stock set_pdata_vector(ent, const vec_offsets[3], const Float:vec[3], intbase_linuxdiff)
{
static i
for(i=0; i<3; i++)
{
set_pdata_float(ent, vec_offsets[i], vec[i], intbase_linuxdiff)
}
}
// If you pass only 1st offset of a vec :
stock get_pdata_vec2(ent, vec_offset, Float:dest[3], intbase_linuxdiff)
{
static i
for(i=0; i<3; i++)
{
dest[i] = get_pdata_float(ent, vec_offsets + i, intbase_linuxdiff)
}
}
stock set_pdata_vec2(ent, vec_offsets, const Float:vec[3], intbase_linuxdiff)
{
static i
for(i=0; i<3; i++)
{
set_pdata_float(ent, vec_offsets + i, vec[i], intbase_linuxdiff)
}
}
Код:
GetGrenadeType( ent, bool:bCheckClass = true )
{
if( bCheckClass )
{
new class[9]
pev(ent, pev_classname, class, charsmax(class))
if( !equal(class, "grenade") )
{
return 0
}
}
if( get_pdata_bool(ent, m_bIsC4) )
{
return CSW_C4
}
new usEvent = get_pdata_short(ent, m_usEvent_Grenade)
if( !usEvent )
{
return CSW_FLASHBANG
}
static m_usHgrenExplo // , m_usSmokeExplo
if( !m_usHgrenExplo )
{
m_usHgrenExplo = engfunc(EngFunc_PrecacheEvent, 1, "events/createexplo.sc")
// m_usSmokeExplo = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc")
}
return usEvent == m_usHgrenExplo ? CSW_HEGRENADE : CSW_SMOKEGRENADE
}
GetWeaponBoxProps( ent, &weapon, &weaponType, &ammoCount, ammoName[], len )
{
for(new i = 1; i<= 5; i++)
{
weapon = get_pdata_cbase(ent, m_rgpPlayerItems_CWeaponBox[i], XO_CWEAPONBOX);
if( weapon > 0 )
{
break;
}
}
if( weapon > 0 )
{
weaponType = get_pdata_int(weapon, m_iId, XO_CBASEPLAYERWEAPON);
}
else
{
weaponType = 0;
}
ammoCount = get_pdata_int(ent, m_rgAmmo_CWeaponBox[1], XO_CWEAPONBOX);
if( ammoCount )
{
global_get(glb_pStringBase, get_pdata_int(ent, m_rgiszAmmo[1], XO_CWEAPONBOX), ammoName, len);
}
}
GiveUserShield( id )
{
set_pdata_bool(id, m_bHasShield, true)
set_pdata_int(id, m_fHasPrimary, 1)
new iActiveItem = get_pdata_cbase(id, m_pActiveItem)
if( iActiveItem > 0 )
{
new ammoIndex = get_pdata_int(iActiveItem, m_iPrimaryAmmoType, XO_CBASEPLAYERWEAPON)
if( ammoIndex > 0 && get_pdata_int(id, m_rgAmmo_CBasePlayer[ ammoIndex ] > 0 ) )
{
ExecuteHamB(Ham_Item_Holster, iActiveItem, 0)
}
if( !ExecuteHamB(Ham_Item_Deploy, iActiveItem) )
{
ExecuteHamB(Ham_Weapon_RetireWeapon, iActiveItem)
}
}
set_pev(id, pev_gamestate, 0)
}
RemoveUserShield( id )
{
if ( get_pdata_bool(id, m_bHasShield) )
{
set_pdata_bool(id, m_bHasShield, false)
set_pdata_int(id, m_fHasPrimary, 0)
set_pdata_bool(id, m_bUsesShield, false)
set_pev(id, pev_gamestate, 1)
new iHideHUD = get_pdata_int(id, m_iHideHUD)
if( iHideHUD & HUD_HIDE_CROSS )
{
set_pdata_int(id, m_iHideHUD, iHideHUD & ~HUD_HIDE_CROSS)
}
}
}
Код:
// CBaseEntity // LINUX DIFF 0
stock const vtbl = 0;
stock const _pev = 1;
stock const m_pGoalEnt = 2;
stock const m_pLink = 3;
stock const m_pfnThink = 4; // linux diff 0
stock const m_pfnThink_Flag_LINUX = 5; // linux only, diff 0
stock const m_pfnTouch = 5; // LINUX DIFF 1
stock const m_pfnTouch_Flag_LINUX = 7; // linux only, diff 0
stock const m_pfnUse = 6; // LINUX DIFF 2
stock const m_pfnUse_Flag_LINUX = 9; // linux only, diff 0
stock const m_pfnBlocked = 7; // LINUX DIFF 3
stock const m_pfnBlocked_Flag_LINUX = 11; // linux only, diff 0
// LINUX DIFF 4
stock const ammo_buckshot_TAB = 11;
stock const ammo_9mm_TAB = 13;
stock const ammo_556nato_TAB = 15;
stock const ammo_556natobox_TAB = 17;
stock const ammo_762nato_TAB = 19;
stock const ammo_45acp_TAB = 21;
stock const ammo_50ae_TAB = 23;
stock const ammo_338magnum_TAB = 25;
stock const ammo_57mm_TAB = 27;
stock const ammo_357sig_TAB = 29;
stock const m_flStartThrow = 30;
stock const m_flReleaseThrow = 31;
stock const m_chargeReady = 32;
stock const m_fInAttack = 33;
// CBaseEntity -> CArmoury
// Linux + 4
stock const XO_CARMOURY = 4;
stock const m_iItem = 34; // weapon ID defined in fgd
stock const m_iCount = 35; // item count before entity desappear
stock const m_iSaveCount = 36; // saved m_iCount value at Spawn
stock const m_bRestoreCount = 148; // if true [g/s]et_pdata_bool
Код:
// Linux +4
#define m_flDelay 34
#define m_iszKillTarget 35
Код:
// Linux +4
#define m_flFrameRate 36
#define m_flGroundSpeed 37
#define m_flLastEventCheck 38
#define m_fSequenceFinished 39
#define m_fSequenceLoops 40
Код:
// CBaseEntity -> CBaseDelay -> CBaseAnimating -> CBaseToggle
// Linux + 4
stock const XO_CBASETOGGLE1 = 4;
stock const m_toggle_state = 41;
stock const m_flActivateFinished = 42;
stock const m_flMoveDistance = 43;
stock const m_flWait = 44;
stock const m_flLip = 45;
stock const m_flTWidth = 46;
stock const m_flTLength = 47;
stock const m_vecPosition1[3] = {48,49,50};
stock const m_vecPosition2[3] = {51,52,53};
stock const m_vecAngle1[3] = {54,55,56};
stock const m_vecAngle2[3] = {57,58,59};
stock const m_cTriggersLeft = 60;
stock const m_flHeight = 61;
stock const m_hActivator_pent = 248; // linux + 16 // get_pdata_ent is (char) based // 62
stock const m_hActivator_serialnumber = 63; // 63
stock const m_pfnCallWhenMoveDone = 64;
// Linux +5
stock const XO_CBASETOGGLE2 = 5;
stock const m_pfnCallWhenMoveDone_Flag_LIN = 69; // linux only, diff 0
stock const m_vecFinalDest[3] = {65,66,67};
stock const m_vecFinalAngle[3] = {68,69,70};
stock const m_bitsDamageInflict = 71;
stock const m_sMaster = 72;
Код:
// CBaseEntity -> CBaseDelay -> CBaseAnimating -> CBaseToggle -> CBaseMonster
// Linux +5
#define m_Activity 73
#define m_IdealActivity 74
#define m_LastHitGroup 75
#define m_bitsDamageType 76
// NOT OFFSETS LOL
#define itbd_Paralyze 0
#define itbd_NerveGas 1
#define itbd_Poison 2
#define itbd_Radiation 3
#define itbd_DrownRecover 4
#define itbd_Acid 5
#define itbd_SlowBurn 6
#define itbd_SlowFreeze 7
#define CDMG_TIMEBASED 8
stock const m_rgbTimeBasedDamage[CDMG_TIMEBASED] = {308,309,...}
// Usage get_pdata_char(id, m_rgbTimeBasedDamage[ itbd_DrownRecover ] )
// set_pdata_char(id, m_rgbTimeBasedDamage[ itbd_Poison ] , 200)
#define m_MonsterState 79
#define m_IdealMonsterState 80
#define m_afConditions 81
#define m_afMemory 82
#define m_flNextAttack 83
#define m_hEnemy_pent 336 // linux +20 // get_pdata_ent is (char) based // 84
#define m_hEnemy_serialnumber 85
#define m_hTargetEnt_pent 344 // linux +20 // get_pdata_ent is (char) based // 86
#define m_hTargetEnt_serialnumber 87
#define m_flFieldOfView 88
#define m_bloodColor 89
#define m_HackedGunPos_x 90
#define m_HackedGunPos_y 91
#define m_HackedGunPos_z 92
stock const m_vecEnemyLKP[3] = {93,94,95}
Код:
// CBaseEntity -> CBaseDelay -> CBaseAnimating -> CBaseToggle -> CBaseMonster -> CBasePlayer
// Linux +5
#define random_seed 96 // See that is shared between client & server for shared weapons code
// 97 unknown
#define m_hSpectatedTarget_pent 392 // linux +20 // m_hSpectatedTarget takes 98 and 99 normally // get_pdata_ent, no set
#define m_hSpectatedTarget_serialnumber 99
#define m_flNextSpecButtonTime 100
#define m_iSpectatedPlayerWeaponId 101
#define m_fHasSpectatedPlayerC4 102
#define m_fHasSpectatedPlayerDefuseKit 103
#define m_iObserverMode 104
#define m_flAnimationTimeDummy 105
// 106 unknown
#define m_fHasTakenHighDamage 107 // Last damage > 60 ?
#define m_flPainShock 108
#define m_iLastZoom 109
#define m_fResumeZoom 110
#define m_flEjectBrass 111
#define m_iKevlarType 112
#define m_fHasSurvivedLastRound 113
#define m_iTeam 114
#define m_iAccount 115
#define m_fHasPrimary 116
// int _dummy_117 // animation // 117 unknown
#define m_iAnimationInCaseDie 118 // set according to hitplace and random values // used when dies to set some properties (velocity, that kind of stuff)
#define m_flNextChatTime 119
// #define m_bHasReceivedDefItems 120 // (1<<0)
#define m_bHasReceivedDefItems 480 // [g/s]et_pdata_bool
#define m_iJoinedState 121
#define m_pLastCamera 122
#define m_flNextCameraTime 123
#define m_flLastActivityTime 124
// #define m_bools125 125 // m_bHasBeenShownBriefing (1<<0) // m_bHasChangeTeamThisRound (1<<8)
#define m_bHasBeenShownBriefing 500 // [g/s]et_pdata_bool
#define m_bHasChangeTeamThisRound 501 // [g/s]et_pdata_bool
#define m_iInternalModel 126
#define m_iTeamMateKills 127
#define m_iIgnoreMessages 128
// #define m_boolsNVG 129 // m_bGotNVG (1<<0) // m_bIsNVGSwitchedOn (1<<8)
#define m_bGotNVG 516 // [g/s]et_pdata_bool
#define m_bIsNVGSwitchedOn 517 // [g/s]et_pdata_bool
// BIG HOLE
#define m_flNextIdleCheckTime 190
#define m_flNextRadioGameTime 191
#define m_iRadiosLeft 192
// #define m_bools193 193 // m_bHasSilentRadio (1<<0) // m_bHasC4 (1<<8) // m_bHasDefuser (1<<16) // m_bBlastDamaged (1<<24)
#define m_bHasSilentRadio 772 // [g/s]et_pdata_bool
#define m_bHasC4 773 // [g/s]et_pdata_bool
#define m_bHasDefuser 774 // [g/s]et_pdata_bool
#define m_bBlastDamaged 775 // [g/s]et_pdata_bool
stock const m_vecRelativeInflictorOrigin[3] = {194,195,196}
#define m_bTruOnHeDamage 197 // CBasePlayer::SetAnimation
#define m_fNextHudTextArgsGameTime 198
// LITTLE HOLE HudTextArgs RELATED
#define m_bitHudTextArgsDontResend 204
#define m_iMenu 205
// 206 unknown
// 207 unknown
#define m_fIsVIPRescued 208
// #define m_boolsAsEscape 209 // m_bHasReachRescueEscapePoint (1<<0) // m_bIsVip (1<<8)
#define m_bHasReachRescueEscapePoint 836 // [g/s]et_pdata_bool
#define m_bIsVip 837 // [g/s]et_pdata_bool
#define m_flNextRadarUpdateTime 210
stock const m_vecLastPosition[3] = {211,212,213}
#define m_iVoteKickUserId 214
#define m_flNextVote 215 // votemap votekick
#define m_iTeamKills 216
#define m_iHostageKills 217
#define m_iVotedMapIndex 218
#define m_bIsPrimaryFireAllowed 219
#define m_flLastAttackTime 220 // not sure
#define m_flNextTeammateAttackAlert 221
// #define m_boolsKilled 222 // m_bKilledByHeadShot (1<<0) // m_bKilledBecauseTeamKill (1<<8) // m_bNotReceivingMoneyNextRound (1<<16)
#define m_bKilledByHeadShot 888 // [g/s]et_pdata_bool
#define m_bKilledBecauseTeamKill 889 // [g/s]et_pdata_bool
#define m_bNotReceivingMoneyNextRound 890 // [g/s]et_pdata_bool
#define m_flNextTimeleft 223
#define m_boolChangeNameAtRespawn 896 // [g/s]et_pdata_bool
#define m_szNewName 897 // (224*4 + 1) [g/s]et_pdata_string // char m_szNewName[32]
#define m_fBombDefusing 232 // m_bBombDefusing (1<<8)
#define m_flNextMapZoneTime 233
#define m_fMapZone 234
#define m_fClientMapZone 235
#define m_pentBombTarget 236
#define m_iPlayerSound 237 // the index of the sound list slot reserved for this player
#define m_iTargetVolume 238 // ideal sound volume.
#define m_iWeaponVolume 239 // how loud the player's weapon is right now.
#define m_iExtraSoundTypes 240 // additional classification for this weapon's sound
#define m_iWeaponFlash 241 // brightness of the weapon flash
#define m_flStopExtraSoundTime 242 //
#define m_flFlashLightTime 243 // Time until next battery draw/Recharge
#define m_iFlashBattery 244 // Flashlight Battery Draw
#define m_afButtonLast 245
#define m_afButtonPressed 246
#define m_afButtonReleased 247
#define m_pentSndLast 248 // last sound entity to modify player room type
#define m_flSndRoomtype 249 // last roomtype set by sound entity
#define m_flSndRange 250 // dist from player to sound entity
#define m_flFallVelocity 251
// constant items
#define ITEM_HEALTHKIT 1
#define ITEM_ANTIDOTE 2
#define ITEM_SECURITY 3
#define ITEM_BATTERY 4
#define MAX_ITEMS 5 // hard coded item types
stock const m_rgItems[MAX_ITEMS] = { 252 , 253 , ... }
#define m_afPhysicsFlags 257 // physics flags - set when 'normal' physics should be revisited or overriden
#define m_fNextSuicideTime 258 // the time after which the player can next use the suicide command
#define m_flTimeStepSound 259 // when the last stepping sound was made
#define m_flTimeWeaponIdle_PLAYER 260 // when to play another weapon idle animation.
#define m_flSwimTime 261 // how long player has been underwater
#define m_flDuckTime 262 // how long we've been ducking
#define m_flWallJumpTime 263 // how long until next walljump
#define m_flSuitUpdate 264 // when to play next suit update
stock const m_rgSuitPlayList[4] = {265,266,...} //[CSUITPLAYLIST] // next sentencenum to play for suit update
#define m_iSuitPlayNext 269 // next sentence slot for queue storage
stock const m_rgiSuitNoRepeat[32] = {270,271,...} // [32] //[CSUITNOREPEAT] // suit sentence no repeat list
stock const m_rgflSuitNoRepeatTime[32] = {302,303,...} // [32] //[CSUITNOREPEAT] // how long to wait before allowing repeat
#define m_lastDamageAmount 334 // Last damage taken
#define m_tbdPrev 335 // Time-based damage timer
#define m_flgeigerRange 336 // range to nearest radiation source
#define m_flgeigerDelay 337 // delay per update of range msg to client
#define m_igeigerRangePrev 338
#define m_iStepLeft 339 // alternate left/right foot stepping sound
#define m_szTextureName 1360 // 440*4 m_szTextureName[19 char] //HL 13 [CBTEXTURENAMEMAX] // current texture name we're standing on
#define m_chTextureType 1379 // current texture type // may be use 344 instead
#define m_idrowndmg 345 // track drowning damage taken
#define m_idrownrestored 346 // track drowning damage restored
#define m_bitsHUDDamage 347 // Damage bits for the current fame. These get sent to
#define m_fInitHUD 348 // True when deferred HUD restart msg needs to be sent
#define m_fGameHUDInitialized 349
#define m_iTrain 350 // Train control position
#define m_fWeapon 351 // Set this to FALSE to force a reset of the current weapon HUD info
#define m_pTank_pent 1408 // linux + 20 // 352 // the tank which the player is currently controlling, NULL if no tank
#define m_pTank_serialnumber 353 // the tank which the player is currently controlling, NULL if no tank
#define m_fDeadTime 354 // the time at which the player died (used in PlayerDeathThink())
#define m_fNoPlayerSound 355 // a debugging feature. Player makes no sound if this is true.
#define m_fLongJump 356 // does this player have the longjump module?
#define m_tSneaking 357
#define m_iUpdateTime 358 // stores the number of frame ticks before sending HUD update messages
#define m_iClientHealth 359 // the health currently known by the client. If this changes, send a new
#define m_iClientBattery 360 // the Battery currently known by the client. If this changes, send a new
#define m_iHideHUD 361 // the players hud weapon info is to be hidden
#define m_iClientHideHUD 362
#define m_iFOV 363 // field of view
#define m_iClientFOV 364 // client's known FOV
#define m_iSpawnCount 365
#define m_pLinkedEntity 366
stock const m_rgpPlayerItems_CBasePlayer[6] = { 367 , 368 , ... }
#define m_pActiveItem 373
#define m_pClientActiveItem 374 // client version of the active item
#define m_pLastItem 375
stock const m_rgAmmo_CBasePlayer[32] = {376,377,...} // 376 // [MAX_AMMO_SLOTS]
stock const m_rgAmmoLast[32] = {408,409,...} // [MAX_AMMO_SLOTS]
stock const m_vecAutoAim[3] = {440,441,442}
#define m_fOnTarget 443
#define m_iDeaths 444
#define m_iRespawnFrames 445 // used in PlayerDeathThink() to make sure players can always respawn
#define m_izSBarState_0 446 // [SBAR_END]
#define m_izSBarState_1 447 // [SBAR_END]
#define m_izSBarState_2 448 // [SBAR_END]
#define m_flNextSBarUpdateTime 449
#define m_flStatusBarDisappearDelay 450
#define m_SbarString0 1804 // [SBAR_STRING_SIZE] // 128
#define m_lastx 483
#define m_lasty 484 // 483 484 // These are the previous update's crosshair angles, DON"T SAVE/RESTORE
#define m_nCustomSprayFrames 485 // Custom clan logo frames for this player
#define m_flNextDecalTime 486 // next time this player can spray a decal // 382
#define m_szTeamName 1948 // m_szTeamName[16]
#define g_szModelIndexPlayer 491 // psz
#define m_szShieldAnimExt 1968 // m_szShieldAnimExt[32]
#define m_iGaitSequence 500
#define m_flGaitFrame 501
#define m_flGaitYaw 502
#define m_flPrevGaitOrigin_x 503
#define m_flPrevGaitOrigin_y 504
#define m_flPrevGaitOrigin_z 505
#define m_flPitch 506
#define m_flYaw 507
#define m_flGaitMovement 508
#define m_fAutoWeaponSwitch 509
// #define m_boolsUserPrefsAndShield 510 // m_bHasVGUIMenus (1<<0) // m_bHasAutoHelp (1<<8) // m_bUsesShield (1<<16) // m_bHasShield (1<<24)
#define m_boolsUserPrefsAndShield 2040 // [g/s]et_pdata_bool
#define m_bHasAutoHelp 2041 // [g/s]et_pdata_bool
#define m_bUsesShield 2042 // [g/s]et_pdata_bool
#define m_bHasShield 2043 // [g/s]et_pdata_bool
#define m_fObserverHasTarget 511
#define m_flFindNextPlayerTime 512
#define m_flDtMultiplier 513
#define m_flFlashedUntil 514
#define m_flFlashedAt 515
#define m_flFlashHoldTime 516
#define m_flFlashDuration 517
#define m_iFlashAlpha 518
#define m_flNextAutoFollowTime 519
#define m_szAutoBuyData[256] 2080 // m_szAutoBuyData[256]
#define m_pSomeRebuyPointer 584 // Rebuy stuff CBasePlayer::Rebuy CBasePlayer::RebuyInitData ClientPutInServer
#define m_iRebuyLastPrimaryItemId 585
#define m_iRebuyLastPrimaryItemAmmo 586
#define m_iRebuyLastSecondaryItemId 587
#define m_iRebuyLastSecondaryItemAmmo 588
#define m_iRebuyHEGrenadeAmmo 589
#define m_iRebuyFlashbangAmmo 590
#define m_iRebuySmokeGrenadeAmmo 591
#define m_iRebuyDefuseKit 592
#define m_iRebuyNVGoggles 593
#define m_iRebuyKevlar 594
#define m_bRebuyStructBuilt 595
#define m_flNextLocationUpdateTime 596
#define m_szLocation 2388 // 597-604 m_szLocation[28]
#define m_flProgressBarStartTime 605
#define m_flProgressBarEndTime 606
#define m_boolsObserver607 607 // m_bObserverAutoDirector (1<<0) // m_bCanSwitchObserverModes (1<<8)
#define m_bObserverAutoDirector 2428 // [g/s]et_pdata_bool
#define m_bCanSwitchObserverModes 2429 // [g/s]et_pdata_bool
// 608
#define m_flIntense 609 win // ?void? CBasePlayer::Intense() { m_flIntense = gpGlobals->time }
// 610
// 611
#define m_flNextSayTime 612
#define m_flNextSayTeamTime 613
#define m_flNextFullUpdateTime 614
#define m_flNextVoteTimeCmd 615
#define m_flNextVoteMapTime 616
#define m_flNextListMapsTime 617
#define m_flNextListPlayersTime 618
#define m_flNextNightVisionTime 619
Код:
// CBaseEntity -> CBaseDelay -> CBaseAnimating -> CBaseToggle -> CBaseMonster -> CGrenade
#define m_bStartDefuse 384 // [g/s]et_pdata_bool
#define m_bIsC4 385 // [g/s]et_pdata_bool
#define m_hDefuser_pent 388 // LINUX + 20 // offset 97
#define m_hDefuser_serial 98
#define m_flDefuseCountDown 99
#define m_flC4Blow 100
#define m_flNextFreqInterval 101
#define m_flNextBeep 102
#define m_flNextFreq 103
#define m_sBeepName 104
#define m_fAttenu 105
#define m_flNextBlink 106
#define m_flNextDefuseCheck 107
#define m_bJustBlew 108
#define m_iGrenadeTeam 109
#define m_iC4Hurry 110
#define m_pentCurBombTarget 444 // LINUX + 20 get_pdata_ent
#define m_SGSmoke 112
// int _dummy_113; // unknown offset
#define m_usEvent_Grenade 228 // [g/s]et_pdata_short
#define m_bLightSmoke 458 // [g/s]et_pdata_bool
// bool m_b459; // set to 1 on smoke explode
stock const m_vecAngles[3] = {115,116,117}
#define m_iRebundsCount 118
#define m_fSoundSet 119
Код:
#if defined _cbaseplayerweapon_included
#endinput
#endif
#define _cbaseplayerweapon_included
#tryinclude "cstrike_pdatas/cbaseanimating_offsets.inc"
// CBaseEntity -> CBaseDelay -> CBaseAnimating -> CBasePlayerItem
// Linux +4
stock const XO_CBASEPLAYERITEM = 4;
// CBasePlayerItem
stock const m_pPlayer = 41;
stock const m_pNext = 42;
stock const m_iId = 43;
// CBaseEntity -> CBaseDelay -> CBaseAnimating -> CBasePlayerItem -> CBasePlayerWeapon
// Linux +4
stock const XO_CBASEPLAYERWEAPON = 4;
// CBasePlayerWeapon
stock const m_iPlayEmptySound = 44;
stock const m_fFireOnEmpty = 45; // True when the gun is empty and the player is still holding down the attack key
stock const m_flNextPrimaryAttack = 46; // soonest time ItemPostFrame will call PrimaryAttack
stock const m_flNextSecondaryAttack = 47; // soonest time ItemPostFrame will call SecondaryAttack
stock const m_flTimeWeaponIdle = 48; // soonest time ItemPostFrame will call WeaponIdle
stock const m_iPrimaryAmmoType = 49; // "primary" ammo index into players m_rgAmmo[]
stock const m_iSecondaryAmmoType = 50; // "secondary" ammo index into players m_rgAmmo[]
stock const m_iClip = 51; // number of shots left in the primary weapon clip, -1 it not used
stock const m_iClientClip = 52; // the last version of m_iClip sent to hud dll
stock const m_iClientWeaponState = 53; // the last version of the weapon state sent to hud dll (is current weapon, is on target)
stock const m_fInReload = 54; // Are we in the middle of a reload;
stock const m_fInSpecialReload = 55; // Are we in the middle of a reload for the shotguns
stock const m_iDefaultAmmo = 56; // how much ammo you get when you pick up this weapon as placed by a level designer.
stock const m_iShellLate = 57;
stock const m_flWeaponSpeed = 58; // used for guns to restore after shield
stock const m_bDelayFire = 236;
stock const m_iDirection = 60; // The current lateral kicking direction ; 1 = right, 0 = left.
stock const m_flAccuracy = 62;
stock const m_flLastFire = 63;
stock const m_iShotFired = 64;
stock const m_iszViewModel = 68;
stock const m_flGlock18Shoot = 69;
stock const m_iGlock18ShotsFired = 70;
stock const m_flFamasShoot = 71;
stock const m_iFamasShotsFired = 72;
stock const m_flFamasBurstSpread = 73;
stock const m_fWeaponState = 74;
enum ( <<=1 )
{
WEAPONSTATE_USP_SILENCED = 1,
WEAPONSTATE_GLOCK18_BURST_MODE,
WEAPONSTATE_M4A1_SILENCED,
WEAPONSTATE_ELITE_LEFT,
WEAPONSTATE_FAMAS_BURST_MODE,
WEAPONSTATE_SHIELD_DRAWN
}
stock const m_flNextReload = 75;
stock const m_flDecreaseShotsFired = 76;
stock const m_usGlock18Event = 154; // [g/s]et_pdata_short
stock const m_usFamasEvent = 155; // [g/s]et_pdata_short
// Weapon Specific :
// Linux +4
// CC4
stock const m_bArming = 312; // offset 82 linux
stock const m_bInArmingAnimation = 313; // offset 82
// bool _dummy_bool_330;
// bool _dummy_bool_331;
stock const m_flArmedTime = 79; // offset 83 linux
// int _dummy_80; // offset 84 linux // set to 1 when deployed and player has shield ?
// CHEGrenade
stock const m_usExplo_HEGREN = 156;
// CAK47
stock const m_iShell_AK47 = 78;
stock const m_fIsDeployed_AK47 = 79;
stock const m_usEvent_AK47 = 160;
// CAUG
stock const m_iShell_AUG = 78;
stock const m_fIsDeployed_AUG = 79;
stock const m_usEvent_AUG = 160;
// CDEAGLE
stock const m_iShell_DEAGLE = 78;
stock const m_usEvent_DEAGLE = 158;
// CELITE
stock const m_iShell_ELITE = 78;
stock const m_usEventLeft_ELITE = 158;
stock const m_usEventRigth_ELITE = 159;
// CFiveSeven
stock const m_iShell_FiveSeven = 78;
stock const m_usEvent_FiveSeven = 158;
// CM249
stock const m_iShell_CM249 = 78;
stock const m_fIsDeployed_CM249 = 79;
stock const m_usEvent_CM249 = 160;
// CM4A1
stock const m_iShell_M4A1 = 78;
stock const m_fIsDeployed_M4A1 = 79;
stock const m_usEvent_M4A1 = 160;
// CMAC10
stock const m_iShell_MAC10 = 78;
stock const m_fIsDeployed_MAC10 = 79;
stock const m_usEvent_MAC10 = 160;
// CMP5N
stock const m_iShell_CMP5N = 78;
stock const m_fIsDeployed_CMP5N = 79;
stock const m_usEvent_CMP5N = 160;
// CP228
stock const m_iShell_P228 = 78;
stock const m_usEvent_P228 = 158;
// CP90
stock const m_iShell_P90 = 78;
stock const m_fIsDeployed_P90 = 79;
stock const m_usEvent_P90 = 160;
// CSG552
stock const m_iShell_SG552 = 78;
stock const m_fIsDeployed_SG552 = 79;
stock const m_usEvent_SG552 = 160;
// CTMP
stock const m_iShell_TMP = 78;
stock const m_fIsDeployed_TMP = 79;
stock const m_usEvent_TMP = 160;
// CUMP45
stock const m_iShell_UMP45 = 78;
stock const m_fIsDeployed_UMP45 = 79;
stock const m_usEvent_UMP45 = 160;
// CUSP
stock const m_iShell_USP = 78;
stock const m_usEvent_USP = 158;
// CGalil
stock const m_iShell_Galil = 78;
stock const m_fIsDeployed_Galil = 79;
stock const m_usEvent_Galil = 160;
// CFamas
stock const m_iShell_Famas = 78;
stock const m_fIsDeployed_Famas = 79;
// CGLOCK18
stock const m_iShell_GLOCK18 = 78;
stock const m_fIsDeployed_GLOCK18 = 79;
// CSmokeGrenade
stock const m_usSmokeExplo = 156;
// CSCOUT
stock const m_iShell_SCOUT = 78;
stock const m_usEvent_SCOUT = 158;
// CAWP
stock const m_iShell_AWP = 78;
stock const m_usEvent_AWP = 158;
// CSG550
stock const m_iShell_SG550 = 78;
stock const m_usEvent_SG550 = 158;
// CG3SG1
stock const m_iShell_G3SG1 = 78;
stock const m_usEvent_G3SG1 = 158;
// CFlashbang // no private data
// CXM1014
stock const m_iShell_XM1014 = 78;
stock const m_flPumpTime_XM1014 = 79;
stock const m_usEvent_XM1014 = 160;
// CM3
stock const m_iShell_CM3 = 78;
stock const m_flPumpTime_CM3 = 79;
stock const m_usEvent_CM3 = 160;
// CC4
stock const m_bArming_C4 = 312;
stock const m_bInArmingAnimation_C4 = 313;
stock const m_flArmedTime_C4 = 79;
// CKnife
stock const m_fAllSolid_CKnife = 78;
stock const m_fStartSolid_CKnife = 79;
stock const m_fInOpen_CKnife = 80;
stock const m_fInWater_CKnife = 81;
stock const m_flFraction_CKnife = 82;
stock const m_vecEndPos_CKnife = {83,84,85};
stock const m_flPlaneDist_CKnife = 86;
stock const m_vecPlaneNormal_CKnife[3] = {87,88,89};
stock const m_pHit_CKnife = 90;
stock const m_iHitgroup_CKnife = 91;
stock const m_usEvent_CKnife = 184;
// CWeaponCycler
stock const m_iszModel_WeaponCycler = 78;
stock const m_iModel_WeaponCycler = 79;
Код:
// CBaseEntity -> CWeaponBox
// Linux +4
#define XO_CWEAPONBOX 4
stock const m_rgpPlayerItems_CWeaponBox[6] = { 34 , 35 , ... }
// Usage get_pdata_cbase(weaponbox, m_rgpPlayerItems_CWeaponBox[ 1 ], 4)
stock const m_rgiszAmmo[32] = { 40 , 41 , ... }
stock const m_rgAmmo_CWeaponBox[32] = { 72 , 73 , ... }
#define m_cAmmoTypes 104
Код:
// CBaseEntity -> CArmoury
// Linux + 4
#define XO_CARMOURY 4
#define m_iItem 34 // weapon ID defined in fgd
#define m_iCount 35 // item count before entity desappear
#define m_iSaveCount 36 // saved m_iCount value at Spawn
#define m_bRestoreCount 148 // if true [g/s]et_pdata_bool
Код:
#if defined _cruleentity_included
#endinput
#endif
#define _cruleentity_included
#tryinclude "/cstrike_pdatas/cbaseentity_offsets.inc"
// CBaseEntity -> CRuleEntity
// Linux +4
stock const XO_CRULEENTITY = 4;
stock const m_iszMaster = 34;
// CBaseEntity -> CRulePointEntity
// No Pdatas
// CBaseEntity -> CRulePointEntity -> CGamePlayerEquip
stock const XO_CGAMEPLAYEREQUIP = 4;
stock const m_weaponNames[32] = {35,36,...};
stock const m_weaponCount[32] = {67,68,...};
Если вы используете что-то из всего этого, вы можете включить их следующим образом:
Код:
#tryinclude <cstrike_pdatas>
#if !defined _cbaseentity_included
#assert Cstrike Pdatas and Offsets library required! Read the below instructions: \
1. Download it at forums.alliedmods.net/showpost.php?p=1712101#post1712101 \
2. Put it into amxmodx/scripting/include/ folder \
3. Compile this plugin locally, details: wiki.amxmodx.org/index.php/Compiling_Plugins_%28AMX_Mod_X%29 \
4. Install compiled plugin, details: wiki.amxmodx.org/index.php/Configuring_AMX_Mod_X#Installing
#endif
На этом всё - Благодарю за Внимание
Вложения
-
13.5 KB Просмотры: 11