triggeractions, im not sure how you do it in gs2 but you do it in gs1 using:
PHP Code:
triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playerdir)*2,Hit,5;
you then need to define that action in a weapon or you could just use hitplayer I guess.... Im not really sure what commands exist in gs2
P.S. The action is called hit and it will send 5 to the receiving player which could be parameter to describe an effect or deal damage

layerhearts-=strtofloat(#p(0));