golanu21 Posted August 5, 2013 Posted August 5, 2013 hi guys, i want to make a script.. but idk how.. i want when player make something... to PUSH it in a direction.. [Dev]BloWnRPG - We BloW the World [1%]
Ab-47 Posted August 5, 2013 Posted August 5, 2013 createObject moveObject onColShapeHit Required arguments, if what you mean by "PUSH", I assume a player entering a col-shape and the object moving? Otherwise it depends on the typical GTA objects, if they're not stable. And now Aurora is back again, pm for more info. Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA. Ex. Developer at Community of Social Gamers - CSG Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP Ab-47
golanu21 Posted August 5, 2013 Author Posted August 5, 2013 man, i want for example function killPlayerIfTheyPressThisKey ( thePlayer, key ) if ( getControlState ( thePlayer, key ) ) then outputChatBox ( "You can do that..", thePlayer ) --THERE IS PUSHING, something like slap but in other direction else --- end end [Dev]BloWnRPG - We BloW the World [1%]
csiguusz Posted August 5, 2013 Posted August 5, 2013 Slap uses setElementVelocity, you can try using it to do waht you want. Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
Ab-47 Posted August 21, 2013 Posted August 21, 2013 I don't understand your needs, maybe: local posx, posy, posz = getElementPosition(localPlayer) setElementPosition(localPlayer, posx + 2, posy + 2, posz) And now Aurora is back again, pm for more info. Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA. Ex. Developer at Community of Social Gamers - CSG Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP Ab-47
Moderators IIYAMA Posted August 21, 2013 Moderators Posted August 21, 2013 Slap uses setElementVelocity, you can try using it to do waht you want. yep function killPlayerIfTheyPressThisKey ( thePlayer, key ) if ( getControlState ( thePlayer, key ) ) then outputChatBox ( "You can do that..", thePlayer ) setElementVelocity ( thePlayer, 3, 3, 1 ) else --- end end Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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