So i made a new command for ulx but i want it to show me that a player is alive if he is and end the fuction there but if a player is alive then it respawns him. So what i want is when a players is dead i want it to respawn the player and if not to show a message that the player is alive
function ulx.respawn (calling_ply, target_ply )
if not target_ply:Alive() then
ulx.fancyLogAdmin( target_ply, "is not dead")
else
target_ply:Spawn()
ulx.fancyLogAdmin( calling_ply, true, "#A forced respawned #T", target_ply )
end
end