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

Wysłany: 2018-01-21, 13:52


Polskitester156

Amazing World






Wiek: 23
Na forum: 3737 dni
Posty: 79
Nick w MP: Radziu

Piwa: 2655

Respekt: 40

Ostrzeżeń: 60%
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 )

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-21, 14:04


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Podaj ca?y b??d podejrzewam ?e nie masz wystarczaj?cej ilo?ci endow.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-21, 14:05


Polskitester156

Amazing World






Wiek: 23
Na forum: 3737 dni
Posty: 79
Nick w MP: Radziu

Piwa: 2655

Respekt: 40

Ostrzeżeń: 60%
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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-21, 14:07


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Dodaj enda do pierwszego, podanego przez Ciebie kodu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-21, 14:15


Polskitester156

Amazing World






Wiek: 23
Na forum: 3737 dni
Posty: 79
Nick w MP: Radziu

Piwa: 2655

Respekt: 40

Ostrzeżeń: 60%
dalej nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-21, 14:51


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

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)


Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Tagi: zamykanie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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