Getting a concommand to play a sound

Code:concommand.Add(“vortal”, SoundStudo)

function SoundStudo ()
sound.Play( “earthquake.mp3”, vPo )
end

Error:
[ERROR] addons/darkrpmodification/lua/darkrp_modules/menu/cl_menu.lua:40: bad argument #2 to ‘Play’ (Vector expected, got nil)

vPo is not defined anywhere and therefore is nil.

How do i get the vector?

Fix’d also use [noparse][lua][/noparse] tags next time
[lua]concommand.Add(“vortal”, SoundStudo)

function SoundStudo( ply )
vPo = ply:GetPos()
sound.Play( “earthquake.mp3”, vPo )
end
[/lua]

Make sure that the sound exists there as well :v:

Math.

[editline]4th July 2014[/editline]

Ninja’d

Well How Can I play Other Sounds Such As From Addons

Just change the sound path in the first argument of sound.Play.