Sex* Posted February 5, 2013 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
xdstep Posted February 6, 2013 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
Sex* Posted February 6, 2013 Author Posted February 6, 2013 U have no idea what youre talking about. Please dont post.
Castillo Posted February 6, 2013 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
Sex* Posted February 7, 2013 Author 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...
Cadu12 Posted February 9, 2013 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
Sex* Posted February 9, 2013 Author Posted February 9, 2013 Thanks Cadu, works. Someone can delete this topic now:D
Castillo Posted February 9, 2013 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.
Cadu12 Posted February 9, 2013 Posted February 9, 2013 Not really, your check will if variable is not empty and/or true. It's not same your.
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