Yurigarga Posted July 12, 2018 Share Posted July 12, 2018 (edited) [2018-07-10 14:19:03] WARNING: [gameplay]/yaratik/zombie_server.lua:320: Bad argument @ 'getElementPosition' [Expected element at argument 1] [2018-07-10 14:19:03] WARNING: [gameplay]/yaratik/zombie_server.lua:321: Bad argument @ 'getElementPosition' [Expected element at argument 1] [2018-07-10 14:19:03] WARNING: [gameplay]/yaratik/zombie_server.lua:322: Bad argument @ 'getDistanceBetweenPoints3D' [Expected vector3 at argument 1, got boolean] --CHECKS FOR ZOMBIE GRABBING FROM BEHIND function Playerthroatbitten ( player, attacker) local Zx, Zy, Zz = getElementPosition( attacker ) local Px, Py, Pz = getElementPosition( player ) local distance = (getDistanceBetweenPoints3D( Px, Py, Pz, Zx, Zy, Zz )) if (distance < 1) then ----323.dize killPed ( player, attacker, weapon, bodypart ) else setPedAnimation (player) end end Edited July 12, 2018 by Yurigarga Link to comment
Addlibs Posted July 12, 2018 Share Posted July 12, 2018 You're not passing player nor attacker into the function, leading to getElementPositions to fail, returning false, which means you don't have actual XYZ positions to compare distance off - you're plugging a bool (false) into what was supposed to be a number (or Vector3) 1 Link to comment
Yurigarga Posted July 13, 2018 Author Share Posted July 13, 2018 (edited) Do you want to add code Edited July 13, 2018 by Yurigarga 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