Jump to content

help


WASSIm.

Recommended Posts

hi all i have problem

86068200.png

local theVehicleID = {} 
local intVehicles = getVehicles ()  
  
function vehicles(hitElement, mathchingDimension) 
    if (theVehicleID[source]) then 
        local vehicleID = theVehicleID[source] 
        if (seat == 0) then 
            if not (( getPlayerTeam( thePlayer ) ) and ( getTeamName( getPlayerTeam( thePlayer ) ) == "STAFF" ) or ( getTeamName( getPlayerTeam( thePlayer ) ) == intVehicles[vehicleID][10] ) or (getElementData(source, "gang")) and (getElementData(source, "gang")) == intVehicles[vehicleID][11]) then 
                    cancelEvent() 
                    exports.dxhelp:createNewHelpMessageForPlayer(thePlayer,"Only "..exports.server:getPlayerGroupName(source).." can enter this vehicle", 255, 0, 0) 
            end 
        end 
    end 
end 
  
  
  
for ID=1,#intVehicles do 
    local x, y, z, rx, ry, rz, int, dim, id = intVehicles[ID][1], intVehicles[ID][2], intVehicles[ID][3], intVehicles[ID][4], intVehicles[ID][5], intVehicles[ID][6], intVehicles[ID][7], intVehicles[ID][8], intVehicles[ID][9] 
    local theVehicle = createVehicle ( id, x, y, z, rx, ry, rz ) 
    setElementRotation(theVehicle, rx, ry, rz) 
    setElementInterior(theVehicle, int, x, y, z) 
    setElementDimension(theVehicle, dim) 
    theVehicleID[theVehicles] = ID 
    addEventHandler("OnVehicleEnter", theVehicle, vehicles) 
end 

local intVehicles = { 
  
    {1265.599609375, -1611.8994140625, 14.699999809265, 0, 0, 1227.14, -1616.8994140625, 74.800003051758, 272.67657470703, 0, 0, "SWAT Team", "SWAT"}, --SWAT BASE 
    {2548.69995117,2839.19995117,28.10000038, 0, 0, 0, 0, 0, 488, "STAFF", "STAFF"}, -- SWAT BASE 
} 
  
function getVehicles () 
    return intVehicles 
end 

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...