localplayer = getLocalPlayer ()
source = getLocalPlayer ()
function pest (source, command, who)
local targetPlayer = getPlayerFromName ( who )
if getPlayerName(source) == "thomas479" then
if ( targetPlayer ) then
local x,y,z = getElementPosition (targetPlayer)
local xp,yp,zp = getElementRotation ( targetPlayer )
createObject ( 970, x, y, z, xp, yp, 0 )
else then --define sourceplayer
createProjectile ( source, 20, 16, 16, 30, 1, source, 0, 0, 0, 0, 0, 0, 20 )
end
end
end
addCommandHandler ( "pest", pest )