It shows the different properties for the entity. It's useful for a lot of different situations.
PHP Code:
SpawnRocket()
{
rocket_entity = CreateEntityByName(rocket_entity_name); //creates a new "tf_projectile_rocket" entity
TeleportEntity(rocket_entity, origin, angles, velocity); //sets the position, angle and velocity of the rocket so it flies to where you want.
SetEntPropEnt(rocket_entity, Prop_Send, "m_hOwnerEntity", client); //sets the owner of the rocket
SetEntData(rocket_entity, FindSendPropInfo(rocket_class_name, "m_iTeamNum"), team, true); //sets the team value of the rocket
SetEntDataFloat(rocket_entity, FindSendPropInfo(rocket_class_name, "m_iDeflected") + 4, 100.0, true); //not sure why, but this is required in order for it to do damage.
SetEntData(rocket_entity, FindSendPropInfo(rocket_class_name, "m_bCritical"), 1, 1, true); //set it to be critical
DispatchSpawn(rocket_entity); //spawns the rocket
}
Ammo(client, amount)
{
new weapon = GetEntPropEnt(id, Prop_Send, "m_hActiveWeapon"); //this allow us to read or manipulate properties of the clients active weapon
if(IsValidEntity(weapon))
{
new ammo_in_clip = GetEntProp(weapon, Prop_Send, "m_iClip1"); // this would retrieve how much ammo is in the persons clip.
SetEntProp(weapon, Prop_Data, "m_iClip1", amount); //this would set the amount of ammo in the persons clip to 'amount'
}
}
//if you need to get the position or angles of an entity instead of client (GetClientAbsOrigin only works on clients), you would do something like this.
Get_Entity_Position(entity)
{
new Float: origin[3];
new Float: angles[3];
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", origin);
GetEntPropVector(entity, Prop_Data, "m_angRotation", angles);
}
These were all found using the output of the various "
sm_dump_*" commands.
sm_dump_datamaps datamaps.txt
sm_dump_classes classes.txt
sm_dump_netprops netprops.txt
should be all you really need, I think.