mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-07-18 17:38:12 +08:00
[saco] Implement/match CActorPed::SetHealth(...)
This commit is contained in:
@ -74,3 +74,15 @@ float CActorPed::GetHealth()
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CActorPed::SetHealth(float fHealth)
|
||||
{
|
||||
if(!m_pPed) return;
|
||||
m_pPed->fHealth = fHealth;
|
||||
|
||||
if(m_pPed->fHealth <= 0.0f) {
|
||||
ScriptCommand(&kill_actor,m_dwGTAId);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
|
@ -83,6 +83,7 @@ const SCRIPT_COMMAND set_actor_z_angle = { 0x0173, "if" };
|
||||
|
||||
const SCRIPT_COMMAND lock_actor = { 0x04d7, "ii" };
|
||||
const SCRIPT_COMMAND refresh_streaming_at = { 0x04E4, "ff" };
|
||||
const SCRIPT_COMMAND kill_actor = { 0x0321, "i" };
|
||||
|
||||
const SCRIPT_COMMAND set_actor_animation_set = { 0x0245, "is" };
|
||||
const SCRIPT_COMMAND request_animation = { 0x04ED, "s" };
|
||||
|
Reference in New Issue
Block a user