Jump to content

Ayuda CreateExplosion


DiosSasuke

Recommended Posts

Hola, alguien me podria decir que hice malo en este script soy nuevo en esto ? En la consola me aparece  server.lua:2: Bad argument @ `getElementPosition` [Expected element at argument 1, got nil]

y Tambien me aparece server.lua:3: Bad argument @ `createexplosion`  [Expected vector3 at argument 1, got boolean]

function explosionOnSpawn ( )
  local pX, pY, pZ = getElementPosition(source)
  createExplosion ( pX, pY, pZ, 6, source )
end
addEventHandler ( "onPlayerSpawn", getRootElement(), explosionOnSpawn )
addCommandHandler ( "sharingan", explosionOnSpawn )
Link to comment

 

function explosionOnSpawn (thePlayer)
  local pX, pY, pZ = getElementPosition(thePlayer)
  createExplosion ( pX, pY, pZ, 6, thePlayer )
end
addEventHandler ( "onPlayerSpawn", getRootElement(), explosionOnSpawn )
addCommandHandler ( "sharingan", explosionOnSpawn )

 

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