kuwalda Posted July 15, 2014 Posted July 15, 2014 Hi. Is is possible and if it is, how can I make "player ghost cars"? With that I mean - you can see players model, nickname and car he is in, but when you drive trough him - you don`t actually hit him, you can just drive trough him. They would overlap or something like that. Is it possible and if so - which functions should I use?
AfuSensi Posted July 15, 2014 Posted July 15, 2014 You can make it with this function: https://wiki.multitheftauto.com/wiki/Se ... idableWith
_DrXenon Posted July 16, 2014 Posted July 16, 2014 But this may disable the movement of the car. ●●● Rage Gaming Society Coming Soon ●●●
Wisam Posted July 17, 2014 Posted July 17, 2014 function disableVehicleCollisionsNearPlayer(thePlayer, maxDistance) local playerX, playerY, playerZ = getElementPosition(thePlayer) local vehicles = getElementsByType("vehicle") for k,v in ipairs(vehicles) do local vehicleX, vehicleY, vehicleZ = getElementPosition(v) -- get the distance between the player and the vehicle: local distance = getDistanceBetweenPoints3D(vehicleX, vehicleY, vehicleZ, playerX, playerY, playerZ) if (distance <= maxDistance) then -- disable collisions for the vehicle setElementCollisionsEnabled(v, false) end end end ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
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