Wysłany: 2021-01-09, 00:01
eksdi123
Wiek: 25 Na forum: 1982 dni Posty: 26
Nick w MP: Kupson
Witam, jestem nowy na tym oto forum...
Zwracam si? do Was z pomoc? a mianowicie posiadam notyfikacje "ec_noti" i chia?em je doda? do przebieralni aczkolwiek nie rozkminie tego...
Z g?ry dzi?kuje oraz przepraszam jak niew?a?ciwe miejsce do tematu.
Wysłany: 2021-01-09, 13:24
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Wklej kod tych notyfikacji. Kod, kt?rym wykonujesz powiadomienie.
Wysłany: 2021-01-09, 20:05
eksdi123
Wiek: 25 Na forum: 1982 dni Posty: 26
Nick w MP: Kupson
exports["ec_noti"]:noti(player, "Wszed?e? do przebieralni.")
A w db3 pokazuje mi, ?e nie odwo?uje si? do triggerClientEvent, a w tym kodzie "ec_noti" mam:
"triggerClientEvent(player,'notifications.create',player,text,type,time)"
Wysłany: 2021-01-09, 22:27
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Wysłany: 2021-01-09, 22:42
eksdi123
Wiek: 25 Na forum: 1982 dni Posty: 26
Nick w MP: Kupson
WARNING: [różne]/ec_noti/s.lua:8: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil]
Co? takiego...
Wysłany: 2021-01-10, 01:21
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Poka? t? linijk?. To jest ta co wklei?e? wy?ej? Masz zdefiniowane 'player'?
Wysłany: 2021-01-10, 01:36
eksdi123
Wiek: 25 Na forum: 1982 dni Posty: 26
Nick w MP: Kupson
Tak, to jest ta co wklei?em wy?ej. Dla streszczenia mo?e wklej? ca?y kod:
createBlip ( 1284.89 , - 1585.36 , 13.55 , 45 , 2 , 0 , 0 , 0 , 0 , 0 , 275 )
wejscie = createMarker ( 1284.52 , - 1585.50 , 13.55 - 1 , "cylinder" , 1.5 , 255 , 0 , 0 , 255 )
wyjscie = createMarker ( 203.87 , - 50.22 , 1001.80 - 0.90 , "cylinder" , 1.5 , 255 , 0 , 0 , 255 )
setElementDimension ( wyjscie , 0 )
setElementInterior ( wyjscie , 1 )
local t3 = createElement ( "text" )
setElementData ( t3 , "name" , "Wyj?cie\nPrzebieralnia\nLS" )
setElementInterior ( t3 , 1 )
setElementDimension ( t3 , 0 )
local t4 = createElement ( "text" )
setElementInterior ( t4 , 0 )
setElementDimension ( t4 , 0 )
setElementData ( t4 , "name" , "Wej?cie\nPrzebieralnia\nLS" )
local t5 = createElement ( "text" )
setElementInterior ( t5 , 1 )
setElementData ( t5 , "name" , "Zmie? skina" )
setElementPosition ( t5 , 213.18 , - 41.68 , 1002.02 )
addEventHandler ( "onMarkerHit" , wejscie , function( el , md )
if not md then return end
if getElementType ( el ) == "player" then
if not isPedInVehicle ( el ) then
fadeCamera ( el , false )
setElementFrozen ( el , true )
setTimer (function ()
-- triggerClientEvent ( el , "onClientAddNotification" , el , "Wszed?e?/a? do Przebieralnii." , 'info' , 255 , 255 , 255 , true )
exports [ "ec_noti" ]: noti ( player , "Wszed?e? do przebieralni." )
setElementInterior ( el , 1 )
setElementPosition ( el , 203.96 , - 45.31 , 1001.80 )
setElementFrozen ( el , false )
-- showPlayerHudComponent ( el , "radar" , false )
fadeCamera ( el , true )
end , 1500 , 1 )
end
end
end )
addEventHandler ( "onMarkerHit" , wyjscie , function( el , md )
if not md then return end
if getElementType ( el ) == "player" then
if not isPedInVehicle ( el ) then
fadeCamera ( el , false )
setElementFrozen ( el , true )
setTimer (function ()
triggerClientEvent ( el , "onClientAddNotification" , el , "Wyszed?e?/a? z Przebieralnii." , 'info' , 255 , 255 , 255 , true )
setElementDimension ( el , 0 )
setElementInterior ( el , 0 )
setElementPosition ( el , 1286.25 , - 1583.79 , 13.55 )
-- showPlayerHudComponent ( el , "radar" , false )
setElementFrozen ( el , false )
-- showPlayerHudComponent ( el , "radar" , false )
fadeCamera ( el , true )
end , 1500 , 1 )
end
end
end )
MarkerSkiny = createMarker ( 213.18 , - 41.68 , 1002.02 - 1.70 , "cylinder" , 2 , 255 , 0 , 0 , 255 )
setElementInterior ( MarkerSkiny , 1 )
function MarkerSkinyPrzeb ( el , md )
if not md or getElementType ( el ) ~= "player" then return end
triggerClientEvent ( el , 'open_skinshop' , el )
end
addEventHandler ( "onMarkerHit" , MarkerSkiny , MarkerSkinyPrzeb )
addEvent ( 'KupSkina' , true )
addEventHandler ( 'KupSkina' , root ,function( player , skinid )
setCameraTarget ( player , player )
local skinid = tonumber ( skinid )
setElementPosition ( player , 209.20 , - 34.08 , 1001.93 )
setCameraTarget ( player , player )
local uid = getElementData ( player , "player:sid" )
local query = exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_users SET skin=? WHERE id=?" , skinid , uid )
setElementData ( player , 'player:skin' , skinid )
setElementModel ( player , skinid )
triggerClientEvent ( player , "onClientAddNotification" , player , "Pomy?lnie zmieni?e? skina." )
end )
addEvent ( 'wyjdzZprzebieralni' , true )
addEventHandler ( 'wyjdzZprzebieralni' , root ,function( player )
setElementPosition ( player , 203.78 , - 38.80 , 1001.80 )
setCameraTarget ( player , player )
setElementInterior ( player , 1 )
setElementDimension ( player , 0 )
end )
Ostatnio zmieniony przez Wilq 2021-01-10, 13:09, w całości zmieniany 1 raz
Wysłany: 2021-01-10, 03:12
TheSebaPL
Mod-team
Wiek: 21 Na forum: 3098 dni Posty: 964
Piwa : 3102
eksdi123 , my jeste?my od tego tutaj aby ci pomoc w rozwi?zaniu b??du a nie zrobienia gotowca. Ja do og??em polecam znale?? w jakim skrypcie mo?e by? stosowana owa notyfikacja i ja wstawi?.
Wysłany: 2021-01-10, 15:58
eksdi123
Wiek: 25 Na forum: 1982 dni Posty: 26
Nick w MP: Kupson
Rozumiem, ale chcia?bym w?asnie z wasz? pomoc? nauczy? si? np tego oto b??du, dlaczego tak si? dzieje i wgl...
A z tym skryptem to nie rozumiem dok?adnie, wklei? kod notyfikacji czy jak.?
Wysłany: 2021-01-10, 16:29
TheSebaPL
Mod-team
Wiek: 21 Na forum: 3098 dni Posty: 964
Piwa : 3102
eksdi123 , po prostu poszukaj po swoich skryptach gdzie jest wykorzystywana owa notyfikacja i j? dodaj.
Wysłany: 2021-01-10, 16:36
MrVip615
witam
Wiek: 22 Na forum: 4307 dni Posty: 167
Nick w MP: ramzes
Piwa : 207
"eksdi123" napisał/a :Tak, to jest ta co wklei?em wy?ej. Dla streszczenia mo?e wklej? ca?y kod:
createBlip ( 1284.89 , - 1585.36 , 13.55 , 45 , 2 , 0 , 0 , 0 , 0 , 0 , 275 )
wejscie = createMarker ( 1284.52 , - 1585.50 , 13.55 - 1 , "cylinder" , 1.5 , 255 , 0 , 0 , 255 )
wyjscie = createMarker ( 203.87 , - 50.22 , 1001.80 - 0.90 , "cylinder" , 1.5 , 255 , 0 , 0 , 255 )
setElementDimension ( wyjscie , 0 )
setElementInterior ( wyjscie , 1 )
local t3 = createElement ( "text" )
setElementData ( t3 , "name" , "Wyj?cie\nPrzebieralnia\nLS" )
setElementInterior ( t3 , 1 )
setElementDimension ( t3 , 0 )
local t4 = createElement ( "text" )
setElementInterior ( t4 , 0 )
setElementDimension ( t4 , 0 )
setElementData ( t4 , "name" , "Wej?cie\nPrzebieralnia\nLS" )
local t5 = createElement ( "text" )
setElementInterior ( t5 , 1 )
setElementData ( t5 , "name" , "Zmie? skina" )
setElementPosition ( t5 , 213.18 , - 41.68 , 1002.02 )
addEventHandler ( "onMarkerHit" , wejscie , function( el , md )
if not md then return end
if getElementType ( el ) == "player" then
if not isPedInVehicle ( el ) then
fadeCamera ( el , false )
setElementFrozen ( el , true )
setTimer (function ()
-- triggerClientEvent ( el , "onClientAddNotification" , el , "Wszed?e?/a? do Przebieralnii." , 'info' , 255 , 255 , 255 , true )
exports [ "ec_noti" ]: noti ( player , "Wszed?e? do przebieralni." )
setElementInterior ( el , 1 )
setElementPosition ( el , 203.96 , - 45.31 , 1001.80 )
setElementFrozen ( el , false )
-- showPlayerHudComponent ( el , "radar" , false )
fadeCamera ( el , true )
end , 1500 , 1 )
end
end
end )
addEventHandler ( "onMarkerHit" , wyjscie , function( el , md )
if not md then return end
if getElementType ( el ) == "player" then
if not isPedInVehicle ( el ) then
fadeCamera ( el , false )
setElementFrozen ( el , true )
setTimer (function ()
triggerClientEvent ( el , "onClientAddNotification" , el , "Wyszed?e?/a? z Przebieralnii." , 'info' , 255 , 255 , 255 , true )
setElementDimension ( el , 0 )
setElementInterior ( el , 0 )
setElementPosition ( el , 1286.25 , - 1583.79 , 13.55 )
-- showPlayerHudComponent ( el , "radar" , false )
setElementFrozen ( el , false )
-- showPlayerHudComponent ( el , "radar" , false )
fadeCamera ( el , true )
end , 1500 , 1 )
end
end
end )
MarkerSkiny = createMarker ( 213.18 , - 41.68 , 1002.02 - 1.70 , "cylinder" , 2 , 255 , 0 , 0 , 255 )
setElementInterior ( MarkerSkiny , 1 )
function MarkerSkinyPrzeb ( el , md )
if not md or getElementType ( el ) ~= "player" then return end
triggerClientEvent ( el , 'open_skinshop' , el )
end
addEventHandler ( "onMarkerHit" , MarkerSkiny , MarkerSkinyPrzeb )
addEvent ( 'KupSkina' , true )
addEventHandler ( 'KupSkina' , root ,function( player , skinid )
setCameraTarget ( player , player )
local skinid = tonumber ( skinid )
setElementPosition ( player , 209.20 , - 34.08 , 1001.93 )
setCameraTarget ( player , player )
local uid = getElementData ( player , "player:sid" )
local query = exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_users SET skin=? WHERE id=?" , skinid , uid )
setElementData ( player , 'player:skin' , skinid )
setElementModel ( player , skinid )
triggerClientEvent ( player , "onClientAddNotification" , player , "Pomy?lnie zmieni?e? skina." )
end )
addEvent ( 'wyjdzZprzebieralni' , true )
addEventHandler ( 'wyjdzZprzebieralni' , root ,function( player )
setElementPosition ( player , 203.78 , - 38.80 , 1001.80 )
setCameraTarget ( player , player )
setElementInterior ( player , 1 )
setElementDimension ( player , 0 )
end )
addEventHandler ( "onMarkerHit" , wejscie , function( el , md )
if not md then return end
if getElementType ( el ) == "player" then
if not isPedInVehicle ( el ) then
fadeCamera ( el , false )
setElementFrozen ( el , true )
setTimer (function ()
-- triggerClientEvent ( el , "onClientAddNotification" , el , "Wszed?e?/a? do Przebieralnii." , 'info' , 255 , 255 , 255 , true )
exports [ "ec_noti" ]: noti ( player , "Wszed?e? do przebieralni." )
setElementInterior ( el , 1 )
setElementPosition ( el , 203.96 , - 45.31 , 1001.80 )
setElementFrozen ( el , false )
-- showPlayerHudComponent ( el , "radar" , false )
fadeCamera ( el , true )
end , 1500 , 1 )
end
end
end )
Uzywasz zmiennej "player", podczas gdy gracz wchodzacy do przebieralni jest definiowany jako "el"
Wysłany: 2021-01-10, 17:57
Skleyu.
Wiek: 29 Na forum: 1992 dni Posty: 3
Nick w MP: Lar3ns
Piwa : 5
Cze?? napisz do mnie na discordzie pv a Ci pomog? ogarn?? ca?y serwer b??dy itd. SatuK#**
Ostatnio zmieniony przez Wilq 2021-01-10, 19:41, w całości zmieniany 1 raz
Tagi: notyfikacje
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: