I see.
For a projectile weapon ricochet, it generally uses in the touch function (self.velocity = old_velocity + 2*trace_plane_normal;).
And then, I created an entity which will spawn at trace_endpos, and its angles set to vectoangles(2*trace_plane_normal), and then doing another traceline using makevectors() with the entity's angles and trace using v_forward.
Here are some screenshots, but the shot won't ricochet if fired on the ground... But that's ok. Works just like HL's Gauss Gun (which doesn't ricochet ground shots).