- Home /
Question by
Nessin · Sep 01, 2014 at 10:55 PM ·
networkauthoritative
How to make server authoritative (and block network.Instantiate from clients) ?
I have been looking all over on finding a way to block clients from sending Network.Instantiate(..) to the whole network.
I managed to block RPC calls by checking for the sender:
[RPC]
public void enterVehicle(NetworkMessageInfo info)
{
if (info.sender.ToString() == "0" || info.sender.ToString() == "-1")
{
But I can't find how to do these same checks on Network.Instantiate() calls
I've also read about using the following:
uLink.Network.isAuthoritativeServer = true;
to block rpc and Instantiate messages going between clients, but I can't seem to find the isAuthoritativeServer variable.
All in all, my question is; how do I check the sender of a Network.Instantiate call ?
Comment
Answer by dnnkeeper · Sep 16, 2014 at 10:05 PM
void OnNetworkInstantiate(NetworkMessageInfo info) {
//check info.sender
}