Jump to content

help


golanu21

Recommended Posts

Posted

hi guys, i want to make a script.. but idk how.. i want when player make something... to PUSH it in a direction..

XajVsWV.png

168_zps269f1907.gif[Dev]BloWnRPG - We BloW the World [1%]168_zps269f1907.gif

Posted
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

9o6E8.png Ab-47

Posted

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 

XajVsWV.png

168_zps269f1907.gif[Dev]BloWnRPG - We BloW the World [1%]168_zps269f1907.gif

  • 3 weeks later...
Posted

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

9o6E8.png Ab-47

  • Moderators
Posted
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 

  Tutorials  4x 

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...