Turbe$Z

Why not working setElementPosition?

Recommended Posts

colShape = createColCuboid( -2061.63379, 1096.16113, 53, 30.0, 25.0, 25.0 )

addEventHandler( "onColShapeHit", colShape, function( hitElement, dimension, thePlayer )
	if not ( dimension ) then return false end
	if( isElement( hitElement) and getElementType( hitElement ) == "player" ) then
		local accName = getAccountName ( getPlayerAccount ( hitElement ) )
		if not( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) ) then
			local veh = getPedOccupiedVehicle(thePlayer)
			if (veh) then
				setElementPosition(veh, -2052.28589, 1087.36926, 55.71875 )
			else
				setElementPosition(thePlayer, -2052.28589, 1087.36926, 55.71875 )
			end	
				outputChatBox("#FFffFFTe ide nem jöhetsz be! Ki lettél rugva a helyről.", thePlayer, 255, 255, 255, true) 
		end
	end
end)

what wrong?

Share this post


Link to post

Replace both "thePlayer" at line nr. 8 and line nr. 12 with "hitElement".

Edited by NeXuS™
  • Like 2

Share this post


Link to post
2 minutes ago, NeXuS™ said:

Replace both "thePlayer " at line nr. 8 and line nr. 12 to hitElement.

Oh, thanks.:o

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.