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: przyjeciu
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...
2. Piwko!.Blip po przyjeciu zlecenia.
Witam. Potrzebuj? ?eby po przyj?ciu zlecenia dawalo blipa id 41 bo nie da sie dojechac bo nie ma lokalizacji a nikt w slepo jezdzic nie bedzie.
Nie mog? za nic tego ogarn??

Dam piwko ka?demu kto mi pomo?e ;)



Client-


[lua]createBlip( -1853.0203857422, 115.5154876709, 14.1171875, 52) -- miejsce pracy dorywczej "kopalnia"

local marker_zacznijprace = createMarker ( -1853.0203857422, 115.5154876709, 14.1171875, "cylinder", 3, 255, 0, 0, 85 ) -- marker w kt?rym zaczyna si? prace

local cele = -- cele kopalnii
{
{ -1805.08,999.21,23.89 };
{ -2016.65,970.11,44.56 };
{ -1955.51,1188.48,44.45 };
{ -1617.51,1074.92,6.19 };
{ -1581.15,865.56,6.60 };
}


addEventHandler("onResourceStart",marker_zacznijprace,
function(panel)
if panel == gracz and not isPedInVehicle(gracz) then
guiSetVisible(marker_zacznijprace,true)
showCursor(true)
end
end)



function marker_cel ()
return unpack ( cele [ math.random ( #cele ) ] )
end



-- [[ Panel Pracy Dorywczej ]] --

----------------------------------------------------------------------------------------------------------------------------------------------------
sx,sy = guiGetScreenSize()
gracz = getLocalPlayer()
pieniadze = math.random(1,2)
------------------------------------------------------------------------...