Wysłany: 2018-01-21, 13:52
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
Witam mam problem ze skryptem polega on na tym:
addEventHandler ( "onClientMarkerHit" , resourceRoot , function( hit )
if hit ~= localPlayer then return end
if source ~= markerek then return end
if markerek and isElement ( markerek ) then
local kasa = 0
if getElementData ( hit , "premium" ) then
kasa = math . random ( 110 , 130 )
else
kasa = math . random ( 90 , 110 )
end
setElementFrozen ( hit , true )
exports [ 'nm-noti' ]: noti ( "Zasadzi?e? donic?, otrzyma?e? wynagrodzenie " .. kasa .. " PLN.\nUdaj si? do zielonego punktu po kwiat!" )
setTimer (function()
setElementFrozen ( hit , false )
destroyElement ( markerek )
destroyElement ( blip )
donicka = false
marekrek = false
triggerServerEvent ( "zabierzdonice" , hit , kasa )
end , 9000 , 1 )
end )
I wyskakuje cos takiego oczywiscie to wyzej jest fragment danego skryptu
unexpected symbol near )
Wysłany: 2018-01-21, 14:04
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Podaj ca?y b??d podejrzewam ?e nie masz wystarczaj?cej ilo?ci endow.
Wysłany: 2018-01-21, 14:05
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
local start = createMarker (- 2789.25 , 1194.53 , 20.42 - 1 , "cylinder" , 1.1 , 255 , 255 , 255 , 100 )
local zaladunek = createMarker (- 2801.21 , 1181.54 , 20.27 - 1 , "cylinder" , 2 , 0 , 0 , 255 , 100 )
createBlipAttachedTo ( start , 46 )
local text1 = createElement ( "text" )
setElementPosition ( text1 , 1985.97 , - 1240.00 , 20.12 )
setElementData ( text1 , "text" , "Praca dorywcza - ogrodnik" )
local text1 = createElement ( "text" )
setElementPosition ( text1 , 1984.40 , - 1228.01 , 20.10 )
setElementData ( text1 , "text" , "Aby podnie?? doniczke - podejd?" )
local punkty = {
{- 2812.30 , 1205.02 , 21.97 },
{- 2822.90 , 1173.20 , 20.27 },
{- 2786.13 , 1122.76 , 28.13 },
{- 2785.44 , 1210.10 , 20.35 },
{- 2848.93 , 1108.46 , 28.46 },
{- 2864.08 , 1172.34 , 11.37 },
{- 2832.91 , 1212.22 , 10.70 },
}
local praca = false
local donicka = false
local markerek = false
addEventHandler ( "onClientMarkerHit" , start , function( player )
if player ~= localPlayer then return end
if getPedOccupiedVehicle ( player ) then return end
if praca then
praca = false
doniczka = false
exports [ 'nm-noti' ]: noti ( "Zako?czy?e? prac? ogrodnika" )
triggerServerEvent ( "zabierzdonice" , player )
if markerek and isElement ( markerek ) then
destroyElement ( markerek )
end
if blip and isElement ( blip ) then
destroyElement ( blip )
end
return
end
exports [ 'nm-noti' ]: noti ( "Rozpocz??e? prac? ogrodnika udaj si? do zielonego punktu po kwiat kt?ry znajduje si? w szopie" )
praca = true
donicka = false
end )
addEventHandler ( "onClientMarkerHit" , zaladunek , function( hit )
if hit ~= localPlayer then return end
if praca == true and donicka ~= true then
donicka = true
local rnd = math . random ( 1 , #punkty)
local p = punkty [ rnd ]
markerek = createMarker ( p [ 1 ], p [ 2 ], p [ 3 ]- 1.2 , "cylinder" , 3 , 255 , 0 , 0 , 175 )
blip = createBlipAttachedTo ( markerek , 41 )
triggerServerEvent ( "doniczka" , hit )
exports [ 'nm-noti' ]: noti ( "Zasad? kwiat w wyznaczone miejsce" )
end
end )
addEventHandler ( "onClientMarkerHit" , resourceRoot , function( hit )
if hit ~= localPlayer then return end
if source ~= markerek then return end
if markerek and isElement ( markerek ) then
local kasa = 0
if getElementData ( hit , "premium" ) then
kasa = math . random ( 110 , 130 )
else
kasa = math . random ( 90 , 110 )
end
setElementFrozen ( hit , true )
exports [ 'nm-noti' ]: noti ( "Zasadzi?e? donic?, otrzyma?e? wynagrodzenie " .. kasa .. " PLN.\nUdaj si? do zielonego punktu po kwiat!" )
setTimer (function()
setElementFrozen ( hit , false )
destroyElement ( markerek )
destroyElement ( blip )
donicka = false
marekrek = false
triggerServerEvent ( "zabierzdonice" , hit , kasa )
end , 9000 , 1 )
end )
Wysłany: 2018-01-21, 14:07
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Dodaj enda do pierwszego, podanego przez Ciebie kodu.
Wysłany: 2018-01-21, 14:15
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
Wysłany: 2018-01-21, 14:51
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Jak wida? wszystko dzia?a
https://i.imgur.com/OixaJej.jpg
A, na dole kod:
local start = createMarker (- 2789.25 , 1194.53 , 20.42 - 1 , "cylinder" , 1.1 , 255 , 255 , 255 , 100 )
local zaladunek = createMarker (- 2801.21 , 1181.54 , 20.27 - 1 , "cylinder" , 2 , 0 , 0 , 255 , 100 )
createBlipAttachedTo ( start , 46 )
local text1 = createElement ( "text" )
setElementPosition ( text1 , 1985.97 , - 1240.00 , 20.12 )
setElementData ( text1 , "text" , "Praca dorywcza - ogrodnik" )
local text1 = createElement ( "text" )
setElementPosition ( text1 , 1984.40 , - 1228.01 , 20.10 )
setElementData ( text1 , "text" , "Aby podnie?? doniczke - podejd?" )
local punkty = {
{- 2812.30 , 1205.02 , 21.97 },
{- 2822.90 , 1173.20 , 20.27 },
{- 2786.13 , 1122.76 , 28.13 },
{- 2785.44 , 1210.10 , 20.35 },
{- 2848.93 , 1108.46 , 28.46 },
{- 2864.08 , 1172.34 , 11.37 },
{- 2832.91 , 1212.22 , 10.70 },
}
local praca = false
local donicka = false
local markerek = false
addEventHandler ( "onClientMarkerHit" , start , function( player )
if player ~= localPlayer then return end
if getPedOccupiedVehicle ( player ) then return end
if praca then
praca = false
doniczka = false
exports [ 'nm-noti' ]: noti ( "Zako?czy?e? prac? ogrodnika" )
triggerServerEvent ( "zabierzdonice" , player )
if markerek and isElement ( markerek ) then
destroyElement ( markerek )
end
if blip and isElement ( blip ) then
destroyElement ( blip )
end
return
end
exports [ 'nm-noti' ]: noti ( "Rozpocz??e? prac? ogrodnika udaj si? do zielonego punktu po kwiat kt?ry znajduje si? w szopie" )
praca = true
donicka = false
end )
addEventHandler ( "onClientMarkerHit" , zaladunek , function( hit )
if hit ~= localPlayer then return end
if praca == true and donicka ~= true then
donicka = true
local rnd = math . random ( 1 , #punkty)
local p = punkty [ rnd ]
markerek = createMarker ( p [ 1 ], p [ 2 ], p [ 3 ]- 1.2 , "cylinder" , 3 , 255 , 0 , 0 , 175 )
blip = createBlipAttachedTo ( markerek , 41 )
triggerServerEvent ( "doniczka" , hit )
exports [ 'nm-noti' ]: noti ( "Zasad? kwiat w wyznaczone miejsce" )
end
end )
addEventHandler ( "onClientMarkerHit" , resourceRoot , function( hit )
if hit ~= localPlayer then return end
if source ~= markerek then return end
if markerek and isElement ( markerek ) then
local kasa = 0
if getElementData ( hit , "premium" ) then
kasa = math . random ( 110 , 130 )
else
kasa = math . random ( 90 , 110 )
end
setElementFrozen ( hit , true )
exports [ 'nm-noti' ]: noti ( "Zasadzi?e? donic?, otrzyma?e? wynagrodzenie " .. kasa .. " PLN.\nUdaj si? do zielonego punktu po kwiat!" )
setTimer (function()
setElementFrozen ( hit , false )
destroyElement ( markerek )
destroyElement ( blip )
donicka = false
marekrek = false
triggerServerEvent ( "zabierzdonice" , hit , kasa )
end , 9000 , 1 )
end
end )
Tagi: zamykanie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: