Jump to content

How to create water on weapon hit position?


Rose

Recommended Posts

It is possible?

Something like this:

function thaResourceStarting( _, _, _, hitX, hitY, hitZ, _, _, _, _ )
		water = createWater(hitX, hitY, hitZ) 
	
    setWaterLevel ( water, 20 )
end
addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), thaResourceStarting)

 

Link to comment
 
  1. water createWater ( int x1, int y1, float z1, int x2, int y2, float z2, int x3, int y3, float z3 [, int x4, int y4, float z4 ] [, bool bShallow = false ] )

 

Required Arguments

  • x1, y1, z1: position of bottom left (south-west) corner.
  • x2, y2, z2: position of bottom right (south-east) corner.
  • x3, y3, z3: position of top left (north-west) corner.

Note: Only 3 coords creates a triangle

 

You'd need to use 2 more Vector3's

Maybe something like this?

water = createWater(hitX - 1 hitY - 1, hitZ,
					hitX + 1, hitY - 1, hitZ,
					hitX - 1, hitY + 1, hitZ)

This would make triangles tho

  • Like 1
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...