openmultiplayer / openmultiplayer/open.mp

NPC doesn't call vehicle events like death or respawn

Open
#1,196 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
641
Forks
208
PR merge metrics
No merged PRs in 30d

Description

If you apply NPC_SetVehicleHealth for a driver NPC and set any low health value for his vehicle like 150.0 or 0.0 when it starts firing and finally explode, still no OnVehicleDeath will be called, nor OnVehicleSpawn after a while too. Looks like this vehicle will explode and disappear only clientside, but not serverside. NPC will just stay at the same place without a car, moreover without his own death and respawn.

Test script where you can compare the behavior in-game: FCNPC / omp NPCs variant

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked FCNPC and open.mp NPC test scripts in a controlled server session and compare vehicle health, explosion, and NPC event behavior. Trace the server-side handling for NPC vehicle damage, destruction, death, and respawn, then verify that vehicle death and spawn events and the NPC's corresponding lifecycle occur server-side.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.