dima3367 Posted March 26, 2015 Share Posted March 26, 2015 Hi all, tell me how to make my script ban on teleportation in the car and make it dosutpnoy only when the player is on foot. local marker = createMarker(-1556.1298828125,-530.66552734375,13.1484375,"cylinder",1.5,230,0,85,225) -- это будет маркер в обычном мире, т.е. в нулевом измерении addEventHandler("onMarkerHit",marker, function (hitElement, matchingDimension) if getElementType (hitElement) == 'player' and matchingDimension then setElementPosition (hitElement,-3037.6647949219,1605.0709228516,39.676563262939) setElementDimension (hitElement, 500) end end) local markerD = createMarker(-3028.0424804688,1649.7550048828,38.817188262939,"cylinder",1.5,230,0,85,225) -- это уже будет маркер в другом измерении setElementDimension (markerD, 500) -- 5 - ид измерения addEventHandler("onMarkerHit",markerD, function (hitElement, matchingDimension) if getElementType (hitElement) == 'player' and matchingDimension then setElementPosition (hitElement,-1512.4594726563,-517.94372558594,14.1484375) setElementDimension (hitElement, 0) end end) Link to comment
TrapLord Studios™ Posted March 26, 2015 Share Posted March 26, 2015 isPlayerInVehicle getPlayerFromName getPlayerSerial addBan Link to comment
dima3367 Posted March 26, 2015 Author Share Posted March 26, 2015 why here "addBan" I need to just if the player drive the machine on a marker that was not teleported Link to comment
WhoAmI Posted March 26, 2015 Share Posted March 26, 2015 local marker = createMarker(-1556.1298828125,-530.66552734375,13.1484375,"cylinder",1.5,230,0,85,225) -- это будет маркер в обычном мире, т.е. в нулевом измерении addEventHandler("onMarkerHit",marker, function (hitElement, matchingDimension) if getElementType (hitElement) == 'player' and matchingDimension then if ( isPedInVehicle ( hitElement ) ) then return end setElementPosition (hitElement,-3037.6647949219,1605.0709228516,39.676563262939) setElementDimension (hitElement, 500) end end) local markerD = createMarker(-3028.0424804688,1649.7550048828,38.817188262939,"cylinder",1.5,230,0,85,225) -- это уже будет маркер в другом измерении setElementDimension (markerD, 500) -- 5 - ид измерения addEventHandler("onMarkerHit",markerD, function (hitElement, matchingDimension) if getElementType (hitElement) == 'player' and matchingDimension then if ( isPedInVehicle ( hitElement ) ) then return end setElementPosition (hitElement,-1512.4594726563,-517.94372558594,14.1484375) setElementDimension (hitElement, 0) end end) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now