Modifying private variables
Traverse.Create(ScriptInstance).Field("fieldname").SetValue(newvalue);
// For example to set the value "stats" of the class Network_Player we can do that :
Traverse.Create(RAPI.getLocalPlayer()).Field("stats").SetValue(mynewstats);Traverse.Create(typeof(classname)).Field("fieldname").SetValue(newvalue);
// For example to set the value "allAvailableItems" of the class ItemManager we can do that :
Traverse.Create(typeof(ItemManager)).Field("allAvailableItems").SetValue(mynewitemlist);Last updated