Jump to content

NEED SCRIPT MADE FAST!


Recommended Posts

i need a script for my admin base made fast and probably today our grand opening is June 30 i can give you money on my server or money in a big server like CIT just please make it

it is a object (ab_vaultDoor)

Model ID 2634

Scale Size: 1.2

coordinates when closed:

X: -688.09997558594

Y: 943.20001220703

Z: 13.800000190735

Coordinates when open

X: -688.09997558594

Y: 943.20001220703

Z: 10.60000038147

I want the gate to go down when a player on the

team "Staff" or "Admins" Walks up to it

Thanks so much Community of United Brief Gaming -Owner James

Link to comment

So you just made this topic: https://forum.multitheftauto.com/viewtopic.php?f=91&t=76874, got many replies which also included a script that made exact what you wanted it to do, from what you are trying to request in here. And then you just removed your topic, why? Do you want any help or not? If you can't even edit a few coordinates in a table of a script served to you for free why would anyone help you then?

Link to comment
-- All gates and their data 
gate = { 
    -- ObjectID     closeX      closeY      closeZ      openX       openY       openZ       rotX    rotY    rotZ    colX    colY    colZ    colRad  Group   Scale 
    [1]={ 11327,    1587.7,     -1638.4,    14.8,       1587.7,     -1638.4,    20,         0,      0,      90,     1588,   -1638,  10,     10,     "ISA",  1 }, 
    [2]={ 10671,    -1631,      688.4,      9.587,      -1631,      688.4,      20.187,     0,      0,      90,     -1631,  688,    7.187,  10,     "ISA",  2 }, 
    [3]={ 11327,    2334.6,     2443.7,     7.70,       2334.6,     2443.7,     15.70,      0,      0,      -30,    2334.6, 2443.7, 5.70,   10,     "ISA",  1.3 }, 
    [4]={ 11327,    2294,       2497.4,     5.3,        2294,       2497.4,     14.3,       0,      0,      0,      2294,   2497.6, 4.3,    15,     "ISA",  1.2 }, 
} 
  
-- Global data members 
gates = { } 
cols =  { } 
ocpenSpeed = 3000 
  
-- Add all gates 
function mapLoad ( name ) 
    for k=1, #gate do 
        -- Create objects 
        local gat = createObject( gate[k][1], gate[k][2], gate[k][3], gate[k][4], gate[k][8], gate[k][9], gate[k][10] ) 
        local col = createColCircle( gate[k][11], gate[k][12], gate[k][13], gate[k][14] ) 
        setObjectScale( gat, gate[k][16] ) 
     
        -- Assign arrays of object pointers 
        gates[col] = gat 
        cols[col] = k 
         
        -- Add event handlers 
        addEventHandler("onColShapeHit", col, openGate ) 
        addEventHandler("onColShapeLeave", col, closeGate ) 
    end 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(), mapLoad ) 
  
-- Gates open                            
function openGate(player) 
    local ID = cols[source] 
    if isElement(player) and ( getElementData(player, "Group" ) == gate[ID][15] or  
        getElementData(player, "Group" ) == "ACRP" ) or getPlayerTeam(player) == getTeamFromName("Staff") then 
        moveObject(gates[source], ocpenSpeed, gate[ID][5], gate[ID][6], gate[ID][7] )  
    end 
end   
-- Gates close 
function closeGate(player) 
    local ID = cols[source] 
    if isElement(player) and ( getElementData(player, "Group" ) == gate[ID][15] or  
        getElementData(player, "Group" ) == "ACRP" ) or getPlayerTeam(player) == getTeamFromName("Staff") then 
        moveObject(gates[source], ocpenSpeed, gate[ID][2], gate[ID][3], gate[ID][4] )  
    end 
end 

^^ That one, works out of the box. If you followed the link you had it right in front of you. This won't require many brain cells to modify for your purposes.

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