Jump to content

GMOD Weapon's real name ESP


UnstucK

Recommended Posts

Most GMOD hacks uses the entity's class name for their Weapon ESP.

But that's not how I do it.

Instead of m4a1_chantico_fire it will display M4A1's Chantico's Fire, which is what we see on HUD.

The solution is simple, we have the GetPrintName() method available on CBaseCombatWeapon class.

Just get it's virtual index and you are ok.

But that will work with "default" or imported weapons from Source games (like CSS's AK47).

After debugging, you will notice that your entity class becomes CWeaponSWEP for custom weapons/items.

That class override CBaseCombatWeapon::GetPrintName()

So again, find its virtual index, and it's almost over !

Now, in your ESP loop, just check the entity class (is CBaseCombatWeapon or CWeaponSWEP) and cast accordingly, then call GetPrintName.

 

image.thumb.png.d892d1102438e56c1c1149a7a4829823.png

image.thumb.png.d8ddf8dbc8dc1f3d8b78d3b2e4f49fd5.png

 

image.thumb.png.435bf0e188e7bd6c2142c8ac7d7992c2.png

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Read Terms of Use to continue