Eh, you can't do onPlayerChat and addCommandHandler on the same function ..
function pointsCommand (player, message, arg1)
local tplayer = getPlayerFromName(arg1) or source
local playerPoints = loadPlayerData (tplayer,"points")
setTimer(outputChatBox,50,1,getPlayerName (tplayer) .. " #FF0000has " .. tostring(playerPoints) .. " points!",getRootElement(),255,0,0,true)
end
end
addCommandHandler('points', pointsCommand)
addEventHandler ("onPlayerChat",getRootElement(), function(message, mtype)
message = split(message,32)
if mtype == 0 then
if message[1] == "!points" then
pointsCommand(source, "!points", message[2])
end
end
end)
And yes this needs full name, if you don't want that copy the function from some other script and insert it yourself