Useful Signatures (Source)

From AlliedModders Wiki
Revision as of 17:43, 28 May 2007 by Olly (talk | contribs)
Jump to: navigation, search

Introduction

I have posted this page here so I can share some useful sigscan signatures. With these, and the use of PimpinJuice's SigOffset Extension you can call some very useful functions from within SourceMod plugins.

Function Signatures

This is the list of all of the functions that we have signatures for.

CBaseEntity::Spawn

This function is used to spawn player entities into the game. Either after creation, or re-spawn the player back to their spawn point. This function is good to call once you have changed the value of 'm_iTeamNum'. Once you have changed this value, you will need to call this function so the swapped player has the right skin and game rules associated.

The Signature

\x83\xec\x2c\x53\x55\x56\x57\x68\x2c\x2d\x49\x22\x8b\xf1\xe8\x2d\x1c\xed\xff\x8b\x06\x8b\xce\xff\x90\x28\x04\x00\x00\x80\xbe\xad\x02\x00\x00\x01\x8d\x8e\xad\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x54\x24\x10\x52\xe8\x85\xa8\xed\xff\x80\xbe\xae\x02\x00\x00\x01\x8d\x8e\xae\x02\x00\x00\xc6\x44\x24\x10\x01\x74\x0a\x8d\x44\x24\x10\x50\xe8\xb7\xa8\xed\xff\x8b\x16\x8b\xce\xff\x92\x9c\x05\x00\x00\x8b\x8e\xf8\x0b\x00\x00\x8b\xd8

The Mask

xxxxxxx?????xx?????xxxxxxxxxxxxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx??xxxxx?????xxxxxxxxxxxxxxxxxx

Length 107

Linux Function

_ZN11CBaseEntity5SpawnEv

Example Call

SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY);

CBaseEntity::Teleport

This function will teleport an entity to a certain place in the world with a given vector. Useful for moving things across the world, or 'pushing' with a given force

The Signature

\x83\xEC\x18\x53\x56\x8B\xD9\x8B\x0D\x78\xB2\x46\x22\x33\xF6\x33\xC0\x3B\xCE\x7E\x21\x8B\x15\x6C\xB2\x46\x22\xEB\x03\x8D\x49\x00\x39\x1C\x82\x74\x09\x83\xC0\x01\x3B\xC1\x7C\xF4\xEB\x08\x3B\xC6\x0F\x8D\x17\x01\x00\x00\x55\x57\x8D\x44\x24\x10\x50\x51\xB9\x6C\xB2\x46\x22\x89\x5C\x24\x18\xE8\xB4\x88\xF9\xFF\x8D\x4C\x24\x14\x51\x53\x89\x44\x24\x18\x89\x74\x24\x1C\x89\x74\x24\x20\x89\x74\x24\x24\x89\x74\x24\x28\x89\x74\x24\x2C

The Mask

xxxxxxx??????xxxxxx?????????????xxx?????xx????xx??????x?????xx?????xxxx?????????xxxxxxxxxxxxxxxxxxxxxxxxxx

Length 106

Linux Function

_ZN11CBaseEntity8TeleportEPK6VectorPK6QAngleS

Function Paramaters

  • Vector newPosition
    • The place to teleport to
  • QAngle newAngles
    • The new angle of the entity
  • Vector newVelocity
    • Directional vector for velocity

Example Call

new Float:Pos[3];
new Float:Vel[3];
SignatureScanCall(sig_id, client, SIGTYPE_CBASEENTITY, PARAM_VECTOR, Pos, PARAM_QANGLE, -1, PARAM_VECTOR, Vel);