Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Objects
- frontGate = createObject (2990,-2469.8000488281,-618.09997558594,135.49999389648,0,0,88.25)
- -------------------- the gate we are going to be moving. (ID,x,y,z,rot x,rot y,rot z)
- parkinglotGate = createObject (2990,-2414.3999023438,-603.20001220703,135.39999389648,0,0,306)
- -------------------- another gate
- frontGateCol = createMarker (-2469.8000488281,-618.09997558594,132.60000610352,'cylinder',7,0,0,0,0)
- parkinglotGateCol = createMarker (-2415,-603.59997558594,132.60000610352,'cylinder',7,0,0,0,0)
- -------------------- collision area for the gate (,x,y,z,rot x,rot y,rot z)
- antiZombie1 = createMarker (-2514.5,-623.09997558594,132.60000610352,'cylinder',58,0,0,0,0)
- antiZombie2 = createMarker (-2394.6000976563,-591,132.60000610352,'cylinder',48,0,0,0,0)
- -------------------- markers for anti zombie zones
- groupSkins = {181,122,33}
- ----//SECTION 1
- --//Front Gate Open and Defense
- function gateOpen (hitPlayer,matchingDimesion) -- the gate open function (theplayer,thedimension)
- local skin = getElementModel (hitPlayer) -- hittest for collision area of the gate
- if skin == 181 then -- the skin(s) that can open this gate
- moveObject (frontGate,500,-2469.8000488281,-618.09997558594,141.39999389648)
- -- moves the gate (gatename,ID,x,y,z,rot x,rot y,rot z)
- else
- killPed (hitPlayer) -- kills you if you are not the right skin
- end
- end
- addEventHandler ('onMarkerHit', frontGateCol, gateOpen) -- the gate hittest EventHandler
- --//Front Gate Close
- function gateClose (hitPlayer,matchingDimesion)
- moveObject (frontGate,500,-2469.8000488281,-618.09997558594,135.49999389648)
- end
- addEventHandler ("onMarkerLeave",frontGateCol, gateClose) -- the gate close function
Add Comment
Please, Sign In to add comment