Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wModify ( source, command, modType, value )
- local pData = getElementData ( source, "selection" )
- if pData == nil then
- outputChatBox ( "You must have and object selected before attempting to alter it.", source )
- else
- if value == nil then
- outputChatBox ( "Please enter a value to modify your object by.", source )
- else
- local x, y, z, rx, ry, rz = getElementAttachedOffsets ( pData )
- if modType == "x" then
- setElementAttachedOffsets ( pData, x + value, y, z, rx, ry, rz )
- elseif modType == "y" then
- setElementAttachedOffsets ( pData, x, y + value, z, rx, ry, rz )
- elseif modType == "z" then
- setElementAttachedOffsets ( pData, x, y, z + value, rx, ry, rz )
- elseif modType == "rx" then
- setElementAttachedOffsets ( pData, x, y, z, rx + value, ry, rz )
- elseif modType == "ry" then
- setElementAttachedOffsets ( pData, x, y, z, rx, ry + value, rz )
- elseif modType == "rz" then
- setElementAttachedOffsets ( pData, x, y, z, rx, ry, rz + value )
- elseif modType == nil then
- outputChatBox ( "You need to choose an axis / rotation axis to modify the object on.", source )
- else
- outputChatBox ( "Please use correct values when choosing your modification type.", source )
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement