Snakegold Posted March 10 Share Posted March 10 hello guys can you tell me how to reduce the col shape height? its very high https://imgur.com/UhKmJ8W Link to comment
FlorinSzasz Posted March 10 Share Posted March 10 1 hour ago, Snakegold said: hello guys can you tell me how to reduce the col shape height? its very high https://imgur.com/UhKmJ8W This should help you https://wiki.multitheftauto.com/wiki/SetColShapeSize Link to comment
WWW Posted March 10 Share Posted March 10 https://wiki.multitheftauto.com/wiki/CreateColCuboid Link to comment
Snakegold Posted March 10 Author Share Posted March 10 11 hours ago, FlorinSzasz said: This should help you https://wiki.multitheftauto.com/wiki/SetColShapeSize didn't work Link to comment
Shady1 Posted March 10 Share Posted March 10 2 hours ago, Snakegold said: didn't work -- First, create a variable to store the size of the colshape local colshapeSize = 5 -- Let's assign a default size of 5 units -- Function to create a square colshape function createSquareColshape(x, y, z) local size = colshapeSize -- Get the colshape size local colshape = createColRectangle(x - size / 2, y - size / 2, size, size) -- Create the square colshape return colshape -- Return the created colshape end -- Function to adjust the colshape size function setColshapeSize(newSize) colshapeSize = newSize -- Set the new size end -- Create a square colshape for testing purposes addCommandHandler("squarecolshape", function(player) local x, y, z = getElementPosition(player) -- Get the position of the player executing the command local colshape = createSquareColshape(x, y, z) -- Create the square colshape outputChatBox("Square colshape created!", player) -- Send a message indicating the colshape is created end) -- Add a command to adjust the size addCommandHandler("colshapesize", function(player, cmd, newSize) newSize = tonumber(newSize) -- Convert the argument to a number if newSize then setColshapeSize(newSize) -- Set the colshape size outputChatBox("Colshape size set to " .. newSize .. "!", player) -- Send a message indicating the size is set else outputChatBox("Invalid size. Please enter a number!", player) -- Send an error message for an invalid size end end) 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