DropDead41 Posted October 15, 2013 Share Posted October 15, 2013 I have a problem with the vehicles respawn in my server of dayz, being exploited they respawn to the original position without the gear to be able to store things, or put the elements needed to make the car work .. I'm using this script, that works fine, but the gear disappears .. someone could re-send me the script with this bug fixed? function respawnVehicle( vehicle ) spawnVehicle ( vehicle, getElementData( vehicle, "posX" ), getElementData( vehicle, "posY" ), getElementData( vehicle, "posZ" ), getElementData( vehicle, "rotX" ), getElementData( vehicle, "rotY" ), getElementData( vehicle, "rotZ" ) ) end function onVehicleSpawn () local x,y,z = getElementPosition (source) setElementData (source,"posX",x) setElementData (source,"posY",y) setElementData (source,"posZ",z) end addEventHandler ("onVehicleExplode",getRootElement(),onVehicleSpawn) function onVehicleExplode () setTimer( respawnVehicle, 50000, 1, source ) end addEventHandler("onVehicleExplode", getRootElement(), onVehicleExplode) DropDead41 New User Posts: 12 Joined: Tue Mar 05, 2013 12:14 am Gang: Groove Top Link to comment
.:HyPeX:. Posted October 23, 2013 Share Posted October 23, 2013 Try using isntead: setAccountData getAccountData getPlayerAccount getAccountName you also got it wrong. you did function .. ( vehicle ) this will not work properly, you should get the element by souce, not by vehicle. try this: function respawnVehicle() local account = getPlayerAccount( source ) spawnVehicle ( vehicle, getAccountData( account, "posX" ), getAccountData( account, "posY" ), getAccountData( account, "posZ" ), getAccountData( account, "rotX" ), getAccountData( account, "rotY" ), getAccountData( account, "rotZ" ) ) end function onVehicleSpawn () local account = getPlayerAccount( source ) local x,y,z = getElementPosition (source) local rx,ry,rz = getElementRotation ( targetElem ) setAccountData (account,"posX",x) setAccountData (account,"posY",y) setAccountData (account,"posZ",z) setAccountData (account,"rotX",rx) setAccountData (account,"rotY",ry) setAccountData (account,"rotZ",rz) end addEventHandler ("onVehicleExplode",getRootElement(),onVehicleSpawn) function onVehicleExplode () setTimer( respawnVehicle, 50000, 1, source ) end addEventHandler("onVehicleExplode", getRootElement(), onVehicleExplode) Link to comment
DropDead41 Posted October 25, 2013 Author Share Posted October 25, 2013 dont work never respawn Link to comment
DropDead41 Posted October 25, 2013 Author Share Posted October 25, 2013 can u send me the full script ready to use it? Link to comment
.:HyPeX:. Posted October 26, 2013 Share Posted October 26, 2013 My bad, are you having a player inside the vehicle when its killed? Link to comment
matttu Posted October 26, 2013 Share Posted October 26, 2013 if you downloaded it from mtadayz.com then i dont think you are the person who should i help because of those as*holes who ruined the dev of the gamemode. Go pro and buy the gamemode from -L- ! -.- Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now