Why do that, you maybe have to put that function on the OnPlayerDisconnect callback, IF I'M RIGHT. :S:S:S:S
Yeah, Lorenc_ is right most likely. Remove the "#pragma unused Object_OnPlayerDisconnect" you added, and add the function inside your OnPlayerConnect callback instead. Else something won't work as it should.