I’m trying to find out how to make a script that freeze’s or kills other players in a radius of x from GetPlayerPed(-1)
I have the freeze and kill part done but I don’t know how to make the radius thing. I tried looking at the LocalChat script to get some inspiration.
function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=GetElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end
I think I’ve seen a server admin doing it on his server but instead of freezing players he deleted cars in a area of 20 meter radius and could just walk around.
Where should one start?