I thought a different way, an option to add a Spawn ID to players, enemies, projectiles, and items. So, this will make that thing act as an invisible spawn ID when executing commands. So you can put "?" as spawn id in character settings for the player and when you spawn something to spawn ID "?" will also appear at the player's position.