OutPut Posted February 27, 2017 Share Posted February 27, 2017 I want to sit down when I click on it Is there such a system? Script name ? Link to comment
Administrators Lpsd Posted February 27, 2017 Administrators Share Posted February 27, 2017 The closest I can find on the community page is this: https://community.multitheftauto.com/index.php?p=gallery&s=show&pic=7023 You should be able to find out how he got the players to sit in the wheelchair by looking at the code. Otherwise to create your own system, you're going to need the following: setPedAnimation, (set the player animation, to be sitting down) getElementPoisiton (find out the position of the chair object) setElementPosition (set the player position, to the same position as the chair, you might need to offset player position slightly to make it look better) setElementFrozen (when the player is sitting, set them frozen, when not, unfreeze them) Link to comment
HeySlickThatsMe Posted February 27, 2017 Share Posted February 27, 2017 There's something like this too: https://community.multitheftauto.com/index.php?p=resources&s=details&id=7634 It allows you to type ./sit to sit and ./up to get up But its not clicking Link to comment
NeXuS™ Posted February 28, 2017 Share Posted February 28, 2017 You could easily do this script with this list of functions and events: onClientClick,getElementModel,triggerServerEvent,getElementPosition,setElementPosition,setElementFrozen,setPedAnimation I linked these functions in an order which you would need in your script. This forum is for help, not for asking scripts, just start writing it, and you have any PROBLEM, we'll help ya. Link to comment
kewizzle Posted March 26, 2017 Share Posted March 26, 2017 local couch1 = createObject(2290, -663, 947.29998779297, 11.5, 0, 0, 90) function elementClicked( theButton, theState, thePlayer ) if ( theButton ) == "left" then setElementPosition(thePlayer, -662.9, 948.39611816406, 12.484375) setElementRotation(thePlayer, 0, 0, 270) setPedAnimation( thePlayer, "food", "ff_sit_look", -1, false) else setPedAnimation( thePlayer ) end end addEventHandler( "onElementClicked", couch1, elementClicked ) I know this post is old but i made this as an example for anyone who stumbles upon this post. 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