addCommandHandler ( "explode",
function ( thePlayer, _, target )
local theTarget = getPlayerFromName ( target ) -- Get the player element from it's name.
if ( theTarget ) then -- If the player exists...
local x, y, z = getElementPosition ( theTarget ) -- Get his position.
for index = 1, 10 do -- Execute createExplosion 10 times.
createExplosion ( x, y, z, 11, thePlayer )
end
end
end
)
Read comments.