| namespace HardHealth|
public class Main : Script
GTA.Native.Function.Call("SET_CHAR_MAX_HEALTH", Player, 100);
For some reason though, I always get this message from the ScriptHook:
| 2013-05-08 23:31:47 - Error during NetHook.Tick:|
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Scripting.NativeContext2.Invoke(SByte* name, NativeContext2* cxt)
at GTA.Native.Function.BaseCall(String Name, Parameter Arguments)
at GTA.Native.Function.Call(String Name, Parameter Arguments)
at GTA.ScriptDomain.RemoteEvent(RemoteEventArgs ev)
2013-05-08 23:31:48 - ...successfully started script 'HardHealth.Main'!
But Niko's health stays the same, 4x the amount of a ped's. I even tried changing it to 25. I still receive the same message, and the max health does not change at all.
Is there something really obvious I am doing wrong? Is there a better function to use than SET_CHAR_MAX_HEALTH?