Frost_I7 Posted August 8, 2018 Share Posted August 8, 2018 (edited) Hi... About month, I'm working on recreating original game in mta (I know, sounds stupid : / )... Map, Scripts and etc. But, during creating cutscene's i got some problem's like: Cannot find id's of cutscene objects, Can't make anim's work (Anim's like: Prolog1 - csplay, csswet and etc.), Cannot find exactly all camera positions (Not that big problem(For now I'm using setCameraTarget instead of setCameraMatrix)), Cannot hide hud (SetPlayerHudComponentVisible - doesn't work... Or it just me)... Some sort of preview: Spoiler And lil' question, not to the same theme... How to make garages open on collision hit? (Like in original game (Wiki's one - doesn't work)) Sorry for english, still not perfect (Not native lang.) Edited August 8, 2018 by Frost_I7 Correction's Link to comment
Dimos7 Posted August 8, 2018 Share Posted August 8, 2018 (edited) addEventHandler("onColShapeHit" Edited August 8, 2018 by Dimos7 Link to comment
Moderators IIYAMA Posted August 8, 2018 Moderators Share Posted August 8, 2018 https://wiki.multitheftauto.com/wiki/OnClientVehicleCollision https://wiki.multitheftauto.com/wiki/SetGarageOpen Link to comment
Frost_I7 Posted August 8, 2018 Author Share Posted August 8, 2018 (edited) (To be honest, i already knew about: "onColShapeHit", "setGarageOpen") This is what i have Spoiler addEventHandler("onResourceStart", getResourceRootElement(), function (resource) local posX, posY, posZ = getGaragePosition(i) local size1, size2, size3 = getGarageSize(i) size1, size2, size3 = 10, 10, 5 garageElements = {} garageElements.col = createColCuboid(posX, posY, posZ, size1, size2, size3) addEventHandler("onColShapeHit", garageElements.col, onGarageHit) addEventHandler("onColShapeLeave", garageElements.col, onGarageLeave) end) function onGarageCubeHit(hitElement, matchingDimension) for i=0,49 do if (getElementType(hitElement) == "player") then outputChatBox("Opening garage") -- For testing purpose if (not isGarageOpen(i)) then setGarageOpen(i, true) end end end end function onGarageCubeLeave(leaveElement, matchingDimension) for i=0,49 do if (getElementType(leaveElement) == "player") then outputChatBox("Closing garage") -- For testing purpose if (isGarageOpen(i)) then setGarageOpen(i, false) end end end end *I'm not always online* Edited August 8, 2018 by Frost_I7 Correction's 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