OneSync PvP problem


I have been trying to fix this problem for several weeks, but with no success, the video below shows the problem, the player dies the same as a ped, starting with a ragdoll and then dying for the shooter, but for the victim he is still alive, it will only really die after the 4th shot.

The problem happens in both Windows and Linux.


Operating system: Tested on Ubuntu 14.04.5 LTS trusty x64 and Windows Server 2012 R2 6.3(Build 9600) x64
Linux Artifact version: 1056
Windows Artifact version: 1096
System specifications:
Processor: Intel® Xeon® Gold 5120 CPU @ 2.20ghz (4 processors)
RAM: 12.00GB


Are you running any script that messes with damage response?


I’m using the vRP Framework that controls when the player is in coma or not


Citizen.CreateThread(function() -- coma thread
  while true do
    local ped = GetPlayerPed(-1)
    local health = GetEntityHealth(ped)
    if health <= cfg.coma_threshold and coma_left > 0 then
      if not in_coma then -- go to coma state
        if IsEntityDead(ped) then -- if dead, resurrect
          local x,y,z = tvRP.getPosition()
          NetworkResurrectLocalPlayer(x, y, z, true, true, false)

        -- coma state
        in_coma = true
        vRPserver.updateHealth({cfg.coma_threshold}) -- force health update
        SetEntityHealth(ped, cfg.coma_threshold)
      else -- in coma
        -- maintain life
        if health < cfg.coma_threshold then 
          SetEntityHealth(ped, cfg.coma_threshold) 
      if in_coma then -- get out of coma state
        in_coma = false

        if coma_left <= 0 then -- get out of coma by death
          SetEntityHealth(ped, 0)

        SetTimeout(5000, function()  -- able to be in coma again after coma death after 5 seconds
          coma_left = cfg.coma_duration*60

We’re using vRP aswell, no general issues regarding PvP or damage.
Check if you have other scripts/resource which may interfere.


in all the resources these are those that use SetEntityHealth

Search "EntityHealth"

  E:\FiveMDev\server\resources\[modmenu]\mellotrainer\cl_admin.lua (1 hit)
	Line 168: 		SetEntityHealth( ped, 0 )

  E:\FiveMDev\server\resources\[modmenu]\mellotrainer\cl_player.lua (2 hits)
	Line 35: 		SetEntityHealth(playerPed, 200)
	Line 51: 		SetEntityHealth(playerPed, 0)

  E:\FiveMDev\server\resources\[modmenu]\mellotrainer\cl_settings.lua (1 hit)
	Line 326: 		if not GetEntityHealth(ped) then -- Dead

  E:\FiveMDev\server\resources\[system]\spawnmanager\spawnmanager.lua (1 hit)
	Line 275:         --SetEntityHealth(ped, 300) -- TODO: allow configuration of this?

  E:\FiveMDev\server\resources\[vrp]\vrp\client\survival.lua (8 hits)
	Line 6:   local n = math.floor(GetEntityHealth(ped)+variation)
	Line 9:   SetEntityHealth(ped,n)
	Line 13:   return GetEntityHealth(GetPlayerPed(-1))
	Line 19:   SetEntityHealth(GetPlayerPed(-1),n)
	Line 88:     local health = GetEntityHealth(ped)
	Line 100:         SetEntityHealth(ped, cfg.coma_threshold)
	Line 108:           SetEntityHealth(ped, cfg.coma_threshold) 
	Line 119:           SetEntityHealth(ped, 0)

  E:\FiveMDev\server\resources\[vrp]\vrp_basic_menu\playerblips\client.lua (1 hit)
	Line 153: 						if not GetEntityHealth( ped ) then -- dead

  E:\FiveMDev\server\resources\[wzl]\jEasyAdmin\admin_client.lua (4 hits)
	Line 77: 	if slapAmount > GetEntityHealth(PlayerPedId()) then
	Line 78: 		SetEntityHealth(PlayerPedId(), 0)
	Line 80: 		SetEntityHealth(PlayerPedId(), GetEntityHealth(PlayerPedId())-slapAmount)
	Line 80: 		SetEntityHealth(PlayerPedId(), GetEntityHealth(PlayerPedId())-slapAmount)

  E:\FiveMDev\server\resources\[wzl]\jEasyAdmin\gui_c.lua (1 hit)
	Line 513: 			table.insert(text,": "..GetEntityHealth(targetPed).."/"..GetEntityMaxHealth(targetPed))

Search for


there is this vRP Framework function

function tvRP.setFriendlyFire(flag)
  SetCanAttackFriendly(GetPlayerPed(-1), flag, flag)

and it is used in a playerSpawn event

AddEventHandler("vRP:playerSpawn",function(user_id, source, first_spawn)
  local data = vRP.getUserDataTable(user_id)

  -- disable police
  -- set friendly fire

Do you have pvp enabled in the vRP configuration file?



local cfg = {}

cfg = {
  thirst_per_minute = 0.00,
  hunger_per_minute = 0.00,
  overflow_damage_factor = 0,
  pvp = true,
  police = false

return cfg

without solution? :disappointed_relieved:


Pls, we really need help with this.


We cant find any trouble. That makes no sense at all.


another day without an answer…


For those of you who dont like reading the main topic.

1 Like

Do you believe that you are alone?
This issue is not even onesync related, please stop asking for thing that you can fix yourself.


so if u think we can fix ourselves, we’re just asking for help cuz we dont even know how. :slight_smile:


it happens even prloblema here the player kills and does not die … and these last days is having a lot of problem of package loss and instability of connection with onesync for these reasons we decided to deactivate it so everything returned to normal without lags and problems of dsync.


its true sometime we didnt get answer right. but in a time i think i found my solution i mean, u have to wait untill admin want to ask your problem… but dont just wait , try think about the solution too
cause i think the admin is busy to ans us