Here is my code for creating a decal.
Decal = CreateDecal(pick.surface, TFormPoint(Vec3(pick.X,pick.Y,pick.Z), NULL, pick.entity), 1.0f, 0);
EntityParent(Decal, pick.entity);
PaintEntity(Decal, LoadMaterial("abstract::dev_decal.mat"));
UpdateMesh(Decal);
AddMesh(Decal, pick.entity);
time = AppTime();
sprintf(key, "%f", time+5000);
SetEntityKey(Decal, "killtime", key);
SetEntityCallback(Decal, (byte *)UpdateBulletDecalCallback, ENTITYCALLBACK_UPDATEPHYSICS);
And here is the code for freeing the decal once the specified time has been reached.
void __stdcall UpdateBulletDecalCallback(TEntity entity)
{
float time, time_value;
str key_value;
key_value = GetEntityKey(entity, "killtime");
time_value = flt(atof(key_value));
time=AppTime();
if(time>time_value)
FreeEntity(entity);
}