Jump to content

Water walk


manawydan

Recommended Posts

  
local Pe = { } 
Pe.R = {} 
Pe.L = {} 
CaminharAgua = function(P,c) 
local x,y,z = getElementPosition(P) 
Pe.R[P] = createObject(2001,x,y,z) 
Pe.L[P] = createObject(2001,x,y,z) 
--setElementCollisionsEnabled 
exports [ "bone_attach" ]:attachElementToBone(Pe.R[P],P,20,0,0,-1) 
exports [ "bone_attach" ]:attachElementToBone(Pe.L[P],P,19,0,0,-1) 
outputChatBox("lol",P) 
end 
addCommandHandler("agua",CaminharAgua) 

i try, but no work, with -1 and 0

any help?

Link to comment

As far as I know you can't walk on attached elements because once attached their collision data is lost. Besides, attached elements to the player will follow the player, so if player's in the water, the element is under water with them.

Link to comment

thank you, the player slides a little, but it works.

-- water walk 
local obj = {} 
  
function WaterWalk() 
if obj[localPlayer] then 
local x,y,_ = getElementPosition(localPlayer) 
setElementPosition(obj[localPlayer],x,y,-.5) 
end 
end 
addEventHandler ("onClientRender",root,WaterWalk) 
  
function WaterOn() 
local px,py,_ = getElementPosition(localPlayer) 
obj[localPlayer] = createObject(1221,px,py,0) 
setElementAlpha(obj[localPlayer],0) 
end 
addCommandHandler("water",WaterOn) 

mta-screen_2014-01-05_14-36-19.jpg

Link to comment
thank you, the player slides a little, but it works.
-- water walk 
local obj = {} 
  
function WaterWalk() 
if obj[localPlayer] then 
local x,y,_ = getElementPosition(localPlayer) 
setElementPosition(obj[localPlayer],x,y,-.5) 
end 
end 
addEventHandler ("onClientRender",root,WaterWalk) 
  
function WaterOn() 
local px,py,_ = getElementPosition(localPlayer) 
obj[localPlayer] = createObject(1221,px,py,0) 
setElementAlpha(obj[localPlayer],0) 
end 
addCommandHandler("water",WaterOn) 

mta-screen_2014-01-05_14-36-19.jpg

This works because itachi is using genjutsu. :roll:

Link to comment

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...