Sex* Posted February 5, 2013 Share Posted February 5, 2013 Im getting this errors, script is working but lagging the server: The 914 line function: function distanceFromPlayerToCheckpoint(player, i) local checkpoint = g_Checkpoints[i] local x, y, z = getElementPosition(player) return getDistanceBetweenPoints3D(x, y, z, unpack(checkpoint.position)) end Link to comment
xdstep Posted February 6, 2013 Share Posted February 6, 2013 what is this script or what is it and try making ur server FPS to 52 if its to high or to low Link to comment
Sex* Posted February 6, 2013 Author Share Posted February 6, 2013 U have no idea what youre talking about. Please dont post. Link to comment
Castillo Posted February 6, 2013 Share Posted February 6, 2013 function distanceFromPlayerToCheckpoint ( player, i ) local checkpoint = g_Checkpoints [ i ] if ( checkpoint ) then local x, y, z = getElementPosition ( player ) return getDistanceBetweenPoints3D ( x, y, z, unpack ( checkpoint.position ) ) end end Link to comment
Sex* Posted February 7, 2013 Author Share Posted February 7, 2013 function distanceFromPlayerToCheckpoint ( player, i ) local checkpoint = g_Checkpoints [ i ] if ( checkpoint ) then local x, y, z = getElementPosition ( player ) return getDistanceBetweenPoints3D ( x, y, z, unpack ( checkpoint.position ) ) end end Still having errors... Link to comment
Castillo Posted February 7, 2013 Share Posted February 7, 2013 On same line and same error? Link to comment
Cadu12 Posted February 9, 2013 Share Posted February 9, 2013 function distanceFromPlayerToCheckpoint ( player, i ) local checkpoint = g_Checkpoints [ i ] if ( checkpoint ~= nil ) then local x, y, z = getElementPosition ( player ) return getDistanceBetweenPoints3D ( x, y, z, unpack ( checkpoint.position ) ) end end Link to comment
Sex* Posted February 9, 2013 Author Share Posted February 9, 2013 Thanks Cadu, works. Someone can delete this topic now:D Link to comment
Castillo Posted February 9, 2013 Share Posted February 9, 2013 That's strange, because my check and his does the same thing. P.S: There's no reason to delete the topic. Link to comment
Cadu12 Posted February 9, 2013 Share Posted February 9, 2013 Not really, your check will if variable is not empty and/or true. It's not same your. 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