Server on client side?Hi all! Does anyone know any way to take the item in which the inventory is clicked? Or you should make a hook for this type OnItemClick?? greetings
I imagine on the side of the server ... to know which item the player clicks on and thus be able to play with the inventory of the players or create a new way to use loot fasterServer on client side?
Server side I think doesn't recieve any sort of click events just move events.I imagine on the side of the server ... to know which item the player clicks on and thus be able to play with the inventory of the players or create a new way to use loot faster
I am almost 100% sure that the item click is not going to the server, since it would flood the network connection.That would be great, doing it on the server side would be perfect ... I imagine
And would there be any way to move items from a chest to inventory on the client's side?I am almost 100% sure that the item click is not going to the server, since it would flood the network connection.
And would there be any way to move items from a chest to inventory on the client's side?
var boxInvId = NetEntityID.Get(Get());
var inventory = NetEntityID.Get(PlayerClient.GetLocalPlayer().rootControllable.gameObject);
for (var i = 0; i <= 30; i++) {
Inventory.ItemMovePredicted(inventory, boxInvId, i, i);
}
public static LootableObject Get() {
var lootableObJs = UnityEngine.Object.FindObjectsOfType < LootableObject > ();
return lootableObJs.FirstOrDefault(lootableObJ => lootableObJ.IsLocalLooting());
}
That seems like a client side method that loops through all of the lootableobjects and checks if you are looting any.C#:var boxInvId = NetEntityID.Get(Get()); var inventory = NetEntityID.Get(PlayerClient.GetLocalPlayer().rootControllable.gameObject); for (var i = 0; i <= 30; i++) { Inventory.ItemMovePredicted(inventory, boxInvId, i, i); }EZzC#:public static LootableObject Get() { var lootableObJs = UnityEngine.Object.FindObjectsOfType < LootableObject > (); return lootableObJs.FirstOrDefault(lootableObJ => lootableObJ.IsLocalLooting()); }![]()
That would require to call something on the server. What are you trying to achive with the click event?And would there be any way to move items from a chest to inventory on the client's side?
This code gets all things from 0 to 30 slot in the inventory and transfers them to the active box - this is a draft workerThat seems like a client side method that loops through all of the lootableobjects and checks if you are looting any.
That would require to call something on the server. What are you trying to achive with the click event?