Jump to content

Script This For Me Please[HELP]


Recommended Posts

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

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 by Guest
Link to comment
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

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

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
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
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
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

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.
×
×
  • Create New...