Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: reportu
1. powiadomienie o przyjęciu reportu
Witam, mam taki ma?y problem z notyfikacjami.
Chodzi o to, ?e funkcja /cl ma tworzy? notk? dla gracza kt?ry zg?osi? report na danego gracza. Co? mi tu nie hula wi?c szukam ma?ej pomocy :)

[lua]
function report(plr, _, kto, ...)
if not getElementData(plr, "user:logged") then return end
if not kto or not ... then
exports.rpg_noti:createNotification(plr, "error", "Poprawne u?ycie: /report <id/nick> <tre??>")
return
end
local target = findPlayer(plr, kto)
if not target then return end
local tresc = table.concat({...}, " ")
local target_id = getElementData(target, "user:tempid")
local target_name = getElementData(target, "user:username")
local player_id = getElementData(plr, "user:tempid")
local player_name = getElementData(plr, "user:username")
exports.rpg_noti:createNotification(plr, "success", "Pomy?lnie wys?ano zg?oszenie na gracza "..target_name)
triggerClientEvent(root, "addToReports", root, player_name.."/"..player_id.. " > "..target_name.."/"..target_id..": "..tresc, target_id)
end
addCommandHandler("report", report)
addCommandHandler("raport", report)

addCommandHandler("cl", function(plr, _, kto)
if getElementData(plr, "user:duty") and kto then
local target = findPlayer(plr, kto)
if not target then return end
local i...