Make sleep people whit a swep

I want to make a swep with which you can make sleep(DarkRP) someone when you shoot on it with this swep
I have le little idea of how to do that but i need some help

Maybe ragdoll the player, make the real player invisible or something, and then once the player “wakes up” teleport them to the ragdoll? If there’s something like a “knock out”/blackjack or taser swep on workshop maybe look at the source code for inspiration/insight.