Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2022-04-16, 17:11


XnoryzPL

Skrypter LUA






Wiek: 25
Na forum: 3247 dni
Posty: 44
Nick w MP: XnoryzPL

Piwa: 771

Respekt: 50

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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-16, 17:59


Lucky!!! :)







Wiek: 20
Na forum: 2372 dni
Posty: 121
Nick w MP: Lucky

Piwa: 1163

Respekt: 50

XnoryzPL,

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
end)


spr?buj tak

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-16, 18:03


kamison

Przyszły programista .lua






Wiek: 25
Na forum: 3302 dni
Posty: 391
Nick w MP: kamison

Piwa: 594

Respekt: 205,3
Respekt: 205,3Respekt: 205,3

triggerClientEvent(localPlayer ,"notifications:add",'player:srp',"Nie posiadasz reputacjiii", 'info' )

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-16, 18:36


XnoryzPL

Skrypter LUA






Wiek: 25
Na forum: 3247 dni
Posty: 44
Nick w MP: XnoryzPL

Piwa: 771

Respekt: 50

"Lucky!!! :) " napisał/a:

XnoryzPL,

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
end)


spr?buj tak


Wszystko cacy smiga ale notyifikacja nie wyskakuje
problem:
Kod:

attempt to call global 'triggerClientEvent' (a nil value)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-16, 18:38


Lucky!!! :)







Wiek: 20
Na forum: 2372 dni
Posty: 121
Nick w MP: Lucky

Piwa: 1163

Respekt: 50

XnoryzPL,

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
end)


teraz?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-16, 20:04


XnoryzPL

Skrypter LUA






Wiek: 25
Na forum: 3247 dni
Posty: 44
Nick w MP: XnoryzPL

Piwa: 771

Respekt: 50

"Lucky!!! :) " napisał/a:

XnoryzPL,

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
end)


teraz?


Nadal ten sam blad

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-16, 20:14


Lucky!!! :)







Wiek: 20
Na forum: 2372 dni
Posty: 121
Nick w MP: Lucky

Piwa: 1163

Respekt: 50

XnoryzPL,

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
end)


teraz?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-17, 14:26


!ryzee

rebornMTA






Wiek: 19
Na forum: 2254 dni
Posty: 111
Nick w MP: drakovskyy

Piwa: 55

Respekt: 60

"XnoryzPL" napisał/a:

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)




addEventHandler("onClientMarkerHit"m1, function(el,md)
if el ~= localPlayer then return end
--if getElementData(localPlayer,'player:srp') < 2500 then outputChatBox("&#10008; #FFFFFFNie posiadasz wymaganej reputacji. (2500 RP)"25500true) return end
if getElementDatalocalPlayer"player:srp" ) < 44400 then
--exports["pystories-notifications"]:createAlert"Nie posiadasz wymaganej reputacji. (2500 SRP)"25500true) return end
triggerClientEvent(localPlayer ,"notifications:add",'player:srp','Nie posiadasz reputacjiii''info')
triggerServerEvent("startJobSV"localPlayerlocalPlayer)
end
end)


Podpis

Żyj własnym życiem, nie mieszaj się w życie innych.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-04-17, 16:00


kamison

Przyszły programista .lua






Wiek: 25
Na forum: 3302 dni
Posty: 391
Nick w MP: kamison

Piwa: 594

Respekt: 205,3
Respekt: 205,3Respekt: 205,3

Dobra bo widz?, ?e tutaj nikt nie wie, jak u?yjesz triggerEvent zamiast triggerClientEvent to powinno dzia?a?.

Postaw piwo autorowi tego posta
 

 
Tagi: notyfikacja :: nie :: działą
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Notyfikacja nie działą Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku