Alexs Posted June 3, 2012 Share Posted June 3, 2012 Hi Everyone, SolidSnake14 Help me with this but i dont know how to finish it. addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "L", "down", crear ) end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) ramps = { } for index, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "L", "down", crear ) end end ) function crear ( player, key, keyState ) local mx, my, mz = getElementPosition ( player ) local accame = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user.".. accame, aclGetGroup ( "Admin" ) ) then ramps [ player ] = createObject ( 1634, mx + 5, my, mz ) setTimer ( function ( theRamp ) if ( theRamp ) then destroyElement ( theRamp ) end end ,3000, 1, ramps [ player ] ) end end The Problem is on coordinates, if i am going to west the ramp spawn in my side and no in my front, how i can fix it? Link to comment
Scooby Posted June 4, 2012 Share Posted June 4, 2012 u need to get the coords a set distance in front of the player... theres a few calculations u can do to get this... sadly i dont have time to write it.. but theres already a community ramps script... u can look in there for how they get the position in front of the player... or just use the script/edit it to how u want it. https://community.multitheftauto.com/index.php?p=resources&s=details&id=92 sorry i dont have time to write it for u... although im sure if u get stuck, someone will have more time to help u. Link to comment
Alexs Posted June 4, 2012 Author Share Posted June 4, 2012 Maybe i edit this and make a Settimer to delete the ramps 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