illestiraqi Posted May 22, 2012 Share Posted May 22, 2012 Well I tried to script myself and I just couldn't fix it, its just to hard for me so PLEASE and im saying PLEASE make this script for me: Door while its Closed: Door while its Opened: Where I want them standing Object (Just gonna use beach towel, just add them then remove the objects): Skin ID's for the gate to Open: 124, 125, 126, 163, 164, 292, 293, 294. IF YOU CAN MAKE THIS SCRIPT FOR ME I WILL SEND YOU A BIG THANK YOU MESSAGE! IM SORRY IF YOU WANTED TO BE REWARDED BUT UNFORTENTLY I DON'T HAVE NOTHING TO GIVE IN RETURN! Please make this script for me! Link to comment
X-SHADOW Posted May 22, 2012 Share Posted May 22, 2012 what is the erros ? /debugscript3 .. Link to comment
Jaysds1 Posted May 22, 2012 Share Posted May 22, 2012 (edited) try this: door = createObject(8948,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) colshape = createColRectangle(-593.90002441406,-476.79998779297,3,-5) addEventHandler("onColShapeHit",colshape,function(hitElement) if(getElementType(hitElement)=="player"or"vehicle")then if(getElementModel(hitElement)==124 or 125 or 126 or 163 or 164 or 292 or 293 or 294)then moveObject(door,-597.79998779297,-476.89999389648,22.700000762939,0,0,0) outputChatBox("Welcome "..getPlayerName(hitElement),hitElement) end end end) addEventHandler("onColShapeLeave",colshape,function(hitElement) if(getElementType(hitElement)=="player"or"vehicle")then if(getElementModel(hitElement)==124 or 125 or 126 or 163 or 164 or 292 or 293 or 294)then moveObject(door,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) outputChatBox("Cya "..getPlayerName(hitElement),hitElement) end end end) And sorry, next time you cannot ask for a script unless you attempt to try making it Edited May 22, 2012 by Guest Link to comment
illestiraqi Posted May 22, 2012 Author Share Posted May 22, 2012 try this:door = createObject(8948,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) colShape = createColRectangle(-593.90002441406,-476.79998779297,3,-5) addEventHandler("onColShapeHit",colshape,function(hitElement) if(getElementType(hitElement)=="player"or"vehicle")then if(getElementModel(hitElement)==124 or 125 or 126 or 163 or 164 or 292 or 293 or 294)then moveObject(door,-597.79998779297,-476.89999389648,22.700000762939,0,0,0) outputChatBox("Welcome "..getPlayerName(hitElement),hitElement) end end end) addEventHandler("onColShapeLeave",colshape,function(hitElement) if(getElementType(hitElement)=="player"or"vehicle")then if(getElementModel(hitElement)==124 or 125 or 126 or 163 or 164 or 292 or 293 or 294)then moveObject(door,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) outputChatBox("Cya "..getPlayerName(hitElement),hitElement) end end end) And sorry, next time you cannot ask for a script unless you attempt to try making it I did try making it by using a gate script and changing it and adding it up but did not work so made this post EDIT: Its not working please fix it and if only one skin change it to 124 skin please Link to comment
Jaysds1 Posted May 22, 2012 Share Posted May 22, 2012 sorry, I found my mistake... copy it again Link to comment
Alpha Posted May 22, 2012 Share Posted May 22, 2012 Try: door = createObject(8948,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) colShape = createColRectangle(-593.90002441406,-476.79998779297,3,-5) addEventHandler("onColShapeHit",colshape,function(hitElement) if(getElementType(hitElement)=="player"or getElementType(hitElement)=="vehicle")then if(getElementModel(hitElement)==124 or getElementModel(hitElement)==125 or getElementModel(hitElement)==126 or getElementModel(hitElement)==163 or getElementModel(hitElement)==164 or getElementModel(hitElement)==292 or getElementModel(hitElement)==293 or getElementModel(hitElement)==294)then moveObject(door,-597.79998779297,-476.89999389648,22.700000762939,0,0,0) outputChatBox("Welcome "..getPlayerName(hitElement),hitElement) end end end) addEventHandler("onColShapeLeave",colshape,function(hitElement) if(getElementType(hitElement)=="player"or getElementType(hitElement)=="vehicle")then if(getElementModel(hitElement)==124 or getElementModel(hitElement)==125 or getElementModel(hitElement)==126 or getElementModel(hitElement)==163 or getElementModel(hitElement)==164 or getElementModel(hitElement)==292 or getElementModel(hitElement)==293 or getElementModel(hitElement)==294)then moveObject(door,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) outputChatBox("Cya "..getPlayerName(hitElement),hitElement) end end end) Link to comment
Jaysds1 Posted May 22, 2012 Share Posted May 22, 2012 lol, you copied my code with the error in it, the colShape needs to be lowercased Link to comment
Alpha Posted May 23, 2012 Share Posted May 23, 2012 I didn't just copy your code, it had a major bug, check again. Here: door = createObject(8948,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) colShape = createColRectangle(-593.90002441406,-476.79998779297,3,-5) addEventHandler("onColShapeHit",colShape,function(hitElement) if(getElementType(hitElement)=="player"or getElementType(hitElement)=="vehicle")then if(getElementModel(hitElement)==124 or getElementModel(hitElement)==125 or getElementModel(hitElement)==126 or getElementModel(hitElement)==163 or getElementModel(hitElement)==164 or getElementModel(hitElement)==292 or getElementModel(hitElement)==293 or getElementModel(hitElement)==294)then moveObject(door,-597.79998779297,-476.89999389648,22.700000762939,0,0,0) outputChatBox("Welcome "..getPlayerName(hitElement),hitElement) end end end) addEventHandler("onColShapeLeave",colShape,function(hitElement) if(getElementType(hitElement)=="player"or getElementType(hitElement)=="vehicle")then if(getElementModel(hitElement)==124 or getElementModel(hitElement)==125 or getElementModel(hitElement)==126 or getElementModel(hitElement)==163 or getElementModel(hitElement)==164 or getElementModel(hitElement)==292 or getElementModel(hitElement)==293 or getElementModel(hitElement)==294)then moveObject(door,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) outputChatBox("Cya "..getPlayerName(hitElement),hitElement) end end end) Link to comment
illestiraqi Posted May 23, 2012 Author Share Posted May 23, 2012 Well Jay, yours failed again, trying Alphas now Link to comment
Jaysds1 Posted May 23, 2012 Share Posted May 23, 2012 how? Did you got any error in debugscript? Did you see any messages like Welcome... and Cya...? Link to comment
illestiraqi Posted May 23, 2012 Author Share Posted May 23, 2012 Well I think these 2 are the opisite, because none of these ones dont work, none of them and so please change these 2 around please and try the script please. Door while its Closed: Door while its Opened: Link to comment
Castillo Posted May 23, 2012 Share Posted May 23, 2012 door = createObject ( 8948, -597.79998779297, -476.89999389648, 26.299999237061, 0, 0, 0 ) colShape = createColTube ( -598.87946, -476.85843, 24.51785, 5, 3.5 ) skins = { [ 124 ] = true, [ 125 ] = true, [ 126 ] = true, [ 163 ] = true, [ 164 ] = true, [ 292 ] = true, [ 293 ] = true, [ 294 ] = true } addEventHandler ( "onColShapeHit", colShape, function ( hitElement ) if ( getElementType ( hitElement ) == "player" ) or ( getElementType ( hitElement ) == "vehicle" ) then if ( skins [ getElementModel ( hitElement ) ] ) then moveObject ( door, 2000, -597.79998779297, -476.89999389648, 22.700000762939, 0, 0, 0 ) outputChatBox ( "Welcome ".. getPlayerName ( hitElement ), hitElement ) end end end ) addEventHandler ( "onColShapeLeave", colShape, function ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) or ( getElementType ( leaveElement ) == "vehicle" ) then if ( skins [ getElementModel ( leaveElement ) ] ) then moveObject ( door, 2000, -597.79998779297, -476.89999389648, 26.299999237061, 0, 0, 0 ) outputChatBox ( "Cya ".. getPlayerName ( leaveElement ), leaveElement ) end end end ) Problems: 1: Your colshape was wrong, you should have used a col tube instead. 2: You forgot to define the moveTime argument @ moveObject. Link to comment
Jaysds1 Posted May 23, 2012 Share Posted May 23, 2012 Problems:1: Your colshape was wrong, you should have used a col tube instead. 2: You forgot to define the moveTime argument @ moveObject. Damn, what a ruff night for me Thanks for tell me Solid :\ Link to comment
illestiraqi Posted May 24, 2012 Author Share Posted May 24, 2012 door = createObject ( 8948, -597.79998779297, -476.89999389648, 26.299999237061, 0, 0, 0 ) colShape = createColTube ( -598.87946, -476.85843, 24.51785, 5, 3.5 ) skins = { [ 124 ] = true, [ 125 ] = true, [ 126 ] = true, [ 163 ] = true, [ 164 ] = true, [ 292 ] = true, [ 293 ] = true, [ 294 ] = true } addEventHandler ( "onColShapeHit", colShape, function ( hitElement ) if ( getElementType ( hitElement ) == "player" ) or ( getElementType ( hitElement ) == "vehicle" ) then if ( skins [ getElementModel ( hitElement ) ] ) then moveObject ( door, 2000, -597.79998779297, -476.89999389648, 22.700000762939, 0, 0, 0 ) outputChatBox ( "Welcome ".. getPlayerName ( hitElement ), hitElement ) end end end ) addEventHandler ( "onColShapeLeave", colShape, function ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) or ( getElementType ( leaveElement ) == "vehicle" ) then if ( skins [ getElementModel ( leaveElement ) ] ) then moveObject ( door, 2000, -597.79998779297, -476.89999389648, 26.299999237061, 0, 0, 0 ) outputChatBox ( "Cya ".. getPlayerName ( leaveElement ), leaveElement ) end end end ) Problems: 1: Your colshape was wrong, you should have used a col tube instead. 2: You forgot to define the moveTime argument @ moveObject. OMG Thank you! Your Script Works! Your Awesome but can you just change the part where you enter and exit it doesn't show any message please and thank you for script but please change that Link to comment
X-SHADOW Posted May 24, 2012 Share Posted May 24, 2012 door = createObject ( 8948, -597.79998779297, -476.89999389648, 26.299999237061, 0, 0, 0 ) colShape = createColTube ( -598.87946, -476.85843, 24.51785, 5, 3.5 ) skins = { [ 124 ] = true, [ 125 ] = true, [ 126 ] = true, [ 163 ] = true, [ 164 ] = true, [ 292 ] = true, [ 293 ] = true, [ 294 ] = true } addEventHandler ( "onColShapeHit", colShape, function ( hitElement ) if ( getElementType ( hitElement ) == "player" ) or ( getElementType ( hitElement ) == "vehicle" ) then if ( skins [ getElementModel ( hitElement ) ] ) then moveObject ( door, 2000, -597.79998779297, -476.89999389648, 22.700000762939, 0, 0, 0 ) end end end ) addEventHandler ( "onColShapeLeave", colShape, function ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) or ( getElementType ( leaveElement ) == "vehicle" ) then if ( skins [ getElementModel ( leaveElement ) ] ) then moveObject ( door, 2000, -597.79998779297, -476.89999389648, 26.299999237061, 0, 0, 0 ) end end end ) Link to comment
Kenix Posted May 24, 2012 Share Posted May 24, 2012 illestiraqi You should write it yourself. Learn https://forum.multitheftauto.com/viewtop ... 0db4dbec00 https://wiki.multitheftauto.com/wiki/Scr ... troduction 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