puerta = createObject (3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90)
function openGate (hitPlayer,matchingDimesion)
local skin = getElementModel (hitPlayer)
if (getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 ) > 7 ) then ((getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 )))
if skin == 217 then
moveObject (puerta,3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90)
else
killPed (hitPlayer)
end
end
function closeGate (hitPlayer,matchingDimesion)
if (getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 ) < 7 ) then ((getDistanceBetweenPoints3D ( x,y,z, 2309,-1218,24 )))
if skin == 217 then
moveObject (puerta,3000,2313.6872558594, -1221.4028320313, 23.098985671997, 0, 0, 90)
end
where my error ??