Evenso, logically this should work and its not :S I have other hooks and functions and they all work fine…Garrysmod bug?
I did just realise you forgot to put ply (to pass the player object on). However I just added it - still a nil error.
Basically I think the hook is providing a nill value for the player being spawned.
Ok I just emptied the whole script and had only the sendtextall and respawn function+hook obv. Still a nil error…
OO I realised I added print wrong when I did it earlier, I just readded it and it does print text to the server console fine. So the error is related to the functions…
AHOY! I have found the problem yayz!
The functions cannot be local…thats whats causing the error! Aw I should have figured, its like in .net with private classes being called directly from public ones - or something. Yayz! I have to popout now, when I get back I will begin making everything non-local that is required by that function.
However I just realised that another hook uses HasJail (local function) and works fine…this is a Garrysmod permissions bug?
Also btw guys, thanks for the help
Its always nice to know I can drop by here and recieve 24/7 help. I should really make a public addon to contribute to the community I will see what I can do