Oh, now i see what you mean by owner. You want to save the player's index. Your method should work great, but there might be a better way. The targetname field is a string and can be usefull for linking with other entities (map makers use it all the time).
In HL1 however, we have these extra fields
https://github.com/dreamstalker/rehl...fs.h#L204-L220
See if you can find these in HL2 and use them, they are great for storing extra data on entities like this.