function onSay(cid, words, param) if getPlayerAccess(cid) ~= 0 then if param ~= '' then local hit_health = 0 local stri = string.find(param, ",", (string.find(param, "[0-9]") + 1)) if stri ~= nil then hit_health = tonumber(string.sub(param,0,string.find(param,",")-1)) if hit_health > 0 then name = string.sub(param, (string.find(param, ",") + 1), string.len(param)) local noob_to_hit = getPlayerByName(name) if isPlayer(noob_to_hit) == TRUE then doCreatureAddHealth(noob_to_hit, -hit_health) doPlayerSendTextMessage(cid, 22, "Postac o nicku >"..name.."< dostala za "..hit_health.." HP.") else doPlayerSendTextMessage(cid, 22, "Postac o nicku >"..name.."< nie istnieje lub jest offline.") end else doPlayerSendTextMessage(cid, 22, "Obrazenia musz byc wieksze niz zero.") end end else doPlayerSendTextMessage(cid, 22, 'Wpisz parametr w formie !hit "6,Noobek Player - 6 obrazen') end end end