among-us-memory
among-us-memory copied to clipboard
Write Light range does not work
I am using the code data.WriteMemory_LightRange(100.0f); but it just flickers to full bright every couple of seconds and then imminently goes back to normal brightness.
Same problem that I am having, and its because the while loop. The thread.sleep, but there is another way to do it, I just forgot the way. Theres a way to make it permanent where when the program launches it stays but not sure how.
use freeze function in memory.dll
never really used memory dll, so how do you use the freeze function exactly? any help would be appreciated, just how to use it, not the whole thing because I don't wanna be spoonfed, just want to learn :)
mem.FreezeValue(data.WriteMemory_LightRange,** , 100f);
I do not know what goes between the stars.
use freeze function in memory.dll
mem.FreezeValue(data.WriteMemory_LightRange,** , 100f);
I do not know what goes between the stars.
use freeze function in memory.dll
FREEZE FUNCTION MEMORY.DLL
/// <summary>
/// Freeze a value to an address.
/// </summary>
/// <param name="address">Your address</param>
/// <param name="type">byte, 2bytes, bytes, float, int, string, double or long.</param>
/// <param name="value">Value to freeze</param>
/// <param name="file">ini file to read address from (OPTIONAL)</param>
Since the value it's float, just put float.
Then I get this error when I tried to put float
With this code: Cheese.mem.FreezeValue(data.WriteMemory_LightRange,float,100f);
its a string, so "float"
Ah, forgot about that! Thanks mate, really really appreciate it, that fixed my issues, truly appreciate it.
Ah, forgot about that! Thanks mate, really really appreciate it, that fixed my issues, truly appreciate it.
no problem :)
mem.FreezeValue("data.WriteMemory_LightRange", "float", "100f");
So tried this code, not sure why it did not work, I put it in the while statement. Might have to find another way.
since you're using Memory's Freeze function you dont need to put it into a while, its a single fire. Also be sure your address is correct.
Ok, I see, well the address is the one in the code,
public void WriteMemory_LightRange(float value) { var targetPointer = Utils.GetMemberPointer(Instance.myLight, typeof(LightSource), "LightRadius"); Cheese.mem.WriteMemory(targetPointer.GetAddress(), "float", value.ToString("0.0")); }
hey could u send me your working light code ? i iddnt manage to get it to work for now :(
PlayerData player = playerDatas.Find((p) => p.IsLocalPlayer);
var lightSourcePtr = HamsterCheese.AmongUsMemory.Utils.GetMemberPointer(player.Instance.myLight, typeof(LightSource), "LightRadius");
HamsterCheese.AmongUsMemory.Cheese.mem.FreezeValue(lightSourcePtr.GetAddress(), "float", "100.0");
However flashes very rapidly, not sure exactly why
Reference it
PlayerData player = playerDatas.Find((p) => p.IsLocalPlayer); var lightSourcePtr = HamsterCheese.AmongUsMemory.Utils.GetMemberPointer(player.Instance.myLight, typeof(LightSource), "LightRadius"); HamsterCheese.AmongUsMemory.Cheese.mem.FreezeValue(lightSourcePtr.GetAddress(), "float", "100.0");
However flashes very rapidly, not sure exactly why
Are u calling it multiple times ? Should only be called once when u use freeze memory or am I wrong ?
How do I reference it tho? Sorry, I can't figure it out @DiamondMiner88
@randomcmd Visual Studio has a quick fix option to add a reference.
@oOHiyoriOo Once
If you want to Unfreeze the value do mem.UnfreezeValue(lightSourcePtr.GetAddress())
Although from testing beware that if player
is null it will freeze your program
Update I got the code to run, but my lights just flicker on for a split second like every 3 seconds and then return to being off. I copy pasted the code and it does that :/