Hello, Wulf.
As I see, I can't call a hook with object as parameter after last Oxide update.
For example, CheckPoints from ServerRewards is not called.
Can’t call hook with object after update
Discussion in 'Rust Development' started by serezhadelaet, Feb 15, 2018.
-
Wulf Community Admin
Do you have any specific examples?
-
a similar problem
-
Code:
private void ShowPoints(ulong userID) => System.Console.WriteLine(ServerRewards.Call("CheckPoints", userID));
Last edited by a moderator: Feb 15, 2018 -
Wulf Community Admin
-
Code:System.Console.WriteLine(ServerRewards.Call("CheckPoints", userID) == null)
-
im assuming something changed in the ..
Code:var player = RustCore.FindPlayerByIdString(id); if (player == null) return 0; return (int)instance.ServerRewards?.Call("CheckPoints", Convert.ToInt64(id));
var player = RustCore.FindPlayerByIdString(id);
[DOUBLEPOST=1518753881][/DOUBLEPOST]IT WAS removed the Convert.ToInt64 all is fine now
[DOUBLEPOST=1518753940][/DOUBLEPOST]so now works like this.
Code:var player = RustCore.FindPlayerByIdString(id); if (player == null) return 0; return (int)instance.ServerRewards?.Call("CheckPoints", (id)); }
-
Wulf Community Admin
-
-
Wulf Community Admin
-
same here ServerRewards example:
private object AddPoints(object userID, int amount)
ServerRewards?.Call("AddPoints", (object)(player.UserIDString), 10);
ServerRewards?.Call("AddPoints", player.UserIDString, 10);
ServerRewards?.Call("AddPoints", player.userID, 10);
not working -
Code:
if (!init) return null; BaseEntity baseEntity = entity as BaseEntity; if (baseEntity == null || !IsBlockEntity(baseEntity)) return null; if (baseEntity.net?.ID == null) return null; if (adminIgnore && target.IsAdmin) return null;