function SlapPlayer(theplayer, command, otherplayername, ...)
otherplayer = getPlayerFromName(otherplayername)
local x, y, z = getElementPosition(otherplayer)
local pname = getPlayerName(theplayer)
local gname = getPlayerName(otherplayer)
z = z+5
succes = setElementPosition(otherplayer, x, y, z)
if(succes) then
outputChatBox(gname.." Was Slapped By Admin "..pname.." Reason : "..table.concat ({...}, ' '), getRootElement(), 255, 0, 0, true)
else
outputChatBox("Failed", theplayer)
end
end
addCommandHandler("sslap", SlapPlayer)
you add 'everything else' '...' into a table and concatenate the values, separated by space into a string