{"hash":"0x835F131E7DC8F97A","ns":"ENTITY","name":"_CHANGE_ENTITY_HEALTH","slug":"_CHANGE_ENTITY_HEALTH","official":false,"named":true,"luaName":"ChangeEntityHealth","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"entity","type":"Entity"},{"name":"amount","type":"float"},{"name":"entity2","type":"Entity"},{"name":"weaponHash","type":"Hash"}],"summary":"Alters entity's health by 'amount'.","descriptions":[{"source":"alloc8or","format":"text","body":"Alters entity's health by 'amount'. Can be negative (to drain health).\nIn the scripts entity2 and weaponHash are unused (zero)."}],"examples":[],"aliases":[],"enums":[],"related":["0x82368787EA73C0F7","0xAC2767ED8BDFAB15"],"build":"1207","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/ENTITY/_CHANGE_ENTITY_HEALTH","markdownUrl":"https://natives.borderlinerp.com/natives/ENTITY/_CHANGE_ENTITY_HEALTH.md","snippets":{"lua":"local retval = ChangeEntityHealth(entity, amount, entity2, weaponHash)","luaInvoke":"local retval = Citizen.InvokeNative(0x835F131E7DC8F97A, entity, amount, entity2, weaponHash, Citizen.ReturnResultAnyway())","js":"const retval = ChangeEntityHealth(entity, amount, entity2, weaponHash);","jsInvoke":"const retval = Citizen.invokeNative('0x835F131E7DC8F97A', entity, amount + 0.0000001, entity2, weaponHash, Citizen.returnResultAnyway());","csharp":"bool retval = Function.Call<bool>((Hash)0x835F131E7DC8F97A, entity, amount, entity2, weaponHash);","notes":["Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat(\"name\")` or a backtick literal like `` `name` ``.","Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.","The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}