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: notyfikacja
1. Notyfikacja nie działą
Witam chce dac pod notyfikacje tekst ze nie posiada RP ale jak napisa?em linijke
to mi wyskakuje zle "unexpected symbol near ')'" pr?bowa?em zmieniac element daty ale nadal nic
tutaj jest wz?r jak powinno i?c:
"triggerClientEvent(player,"notifications:add",resourceRoot,text,type)"
nie wiem gdzie jest zle za odpowiedz daje piweczko mordeczki <3

Kod:

addEventHandler("onClientMarkerHit", m1, function(el,md)
if el ~= localPlayer then return end
--if getElementData(localPlayer,'player:srp') < 2500 then outputChatBox("✘ #FFFFFFNie posiadasz wymaganej reputacji. (2500 RP)", 255, 0, 0, true) return end
if getElementData( localPlayer, "player:srp" ) < 44400 then
--exports["pystories-notifications"]:createAlert( "Nie posiadasz wymaganej reputacji. (2500 SRP)", 255, 0, 0, true) return end
triggerClientEvent(localPlayer ,"notifications:add",'player:srp',"Nie posiadasz reputacjiii", info)
triggerServerEvent("startJobSV", localPlayer, localPlayer)
end)
2. Notyfikacja nie chce działać nie wiadomo, z jakiego powodu.
Witam, mam problem z notyfikacjami s? one w??czone, gdy chce, aby skrypt przechowywalni pokazywa? w notyfikacji wy?wietla si? b??d w debug script 3.

Kod:

ERROR: [Skrypty]przechowywalnialc.lua:204: call: faled to call 'notif_c:showPlayerNotification
[string "?"]
3. notyfikacja po stronie servera
mam taki oto blad w db3
WARNING: [skrypty]/v_noti/server/notifications_s.lua: Bad argument @ 'triggerClientEvent' [Expected string at agument 1, got nil]

a o to kod
[lua]
function refreshingb(client)
-- Pobieramy UID gracza
local sid=getElementData(client,"player:sid")
if not sid then return end

-- Pobieramy wyniki
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE ownedPlayer=?", sid)
triggerClientEvent(client, "board:refresh", resourceRoot, result)
end

local noti = exports.v_noti

addEvent("board:new", true)
addEventHandler("board:new", resourceRoot, function(id,name,board,cost)
-- Pobieramy UID gracza
local sid=getElementData(client,"player:sid")
if not sid then return end
-- Sprawdzamy czy jest jeszcze w?a?cicielem
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND ownedPlayer=?", id, sid)
if #result < 0 then
noti:noti("Nie jeste? w?a?cicielem tego pojazdu.", player)
return
end
local query=exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET plateText=? WHERE id=? AND ownedPlayer=?", board, id, sid)
if query then
takePlayerMoney(client, cost)
noti:noti("Pomy?lnie zmieniono,ntablic? rejestracyjn? pojazdowi:n"..name.." (ID: "..id..") na: "..board.."", player)
refreshingb(cl...
4. Notyfikacja
Witam w jaki spos?b zrobi? aby jak pokaze sie 2 razy notyfikacja to aby 2 by?a pod t? 1 Oraz aby po 4 Notyfikacji 5 Pokazywa?a sie jako 1?

[lua]

function drawMessages()
if #wiadomosci > 0 then
for i,v in ipairs( wiadomosci ) do
messageNoHex = string.gsub(wiadomosci[i], "#%x%x%x%x%x%x", "")

local czcionka = dxCreateFont("Righteous-Regular.ttf", 15)
dxDrawLine((screenW * 0.7167) - 1, (screenH * 0.2721) - 1, (screenW * 0.7167) - 1, screenH * 0.3451, tocolor(5, 1, 161, 255), 1, false)
dxDrawLine(screenW * 0.9824, (screenH * 0.2721) - 1, (screenW * 0.7167) - 1, (screenH * 0.2721) - 1, tocolor(5, 1, 161, 255), 1, false)
dxDrawLine((screenW * 0.7167) - 1, screenH * 0.3451, screenW * 0.9824, screenH * 0.3451, tocolor(5, 1, 161, 255), 1, false)
dxDrawLine(screenW * 0.9824, screenH * 0.3451, screenW * 0.9824, (screenH * 0.2721) - 1, tocolor(5, 1, 161, 255), 1, false)
dxDrawRectangle(screenW * 0.7167, screenH * 0.2721, screenW * 0.2657, screenH * 0.0729, tocolor(0, 0, 0, 153), false)
dxDrawText(wiadomosci[i], (screenW * 0.7584) - 1, (screenH * 0.2721) - 1, (screenW * 0.9824) - 1, (screenH * 0.3451) - 1, tocolor(0, 0, 0, 255), 1.2, "Righteous-Regular.ttf", "center", "center", false, false, false, false, false)
dxDrawText(wiadomosci[i], (screenW * 0.7584) + 1, (screenH * 0.2721) - 1, (screenW * 0.9824) + 1, (screenH * 0.3451) - 1, tocolor...