Jump to content

removePedFromVehicle not sync


Fabioxps

Recommended Posts

Posted

when I use this on the server removePedFromVehicle(...) and use this on he client  print(tostring(getPedOccupiedVehicle(localPlayer))) the player is still in the vehicle

  • MTA Team
Posted
5 minutes ago, Fabioxps said:

I do not know how to report the error can someone do this for me?

Show us your full code and tests first, assuming (or the suggestion by pirulax) it's a bug is kinda hurried.

  • Thanks 1
Posted (edited)
function playerWasted()
           removePedFromVehicle(source)

triggerClientEvent(source,"checkRemovedVehicleInClient",source)
end
addEventHandler("onPlayerWasted", root, playerWasted)

 

client

 

addEvent("checkRemovedVehicleInClient",true)
addEventHandler("checkRemovedVehicleInClient",localPlayer,function()
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
   print("in vehicle")
   else
   print("not in vehicle")
end
end)

 

Edited by Fabioxps
  • Moderators
Posted (edited)

It's not synced immediately, but after the time set in mtaserver.conf passes. 

Edited by Pirulax

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...