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

Wysłany: 2018-03-05, 14:50


Kuks*







Wiek: 15
Na forum: 3030 dni
Posty: 246
Nick w MP: Kuks*

Piwa: 2208

Respekt: 115,8
Respekt: 115,8

Siema, mam problem: robi? skrypt na prac? dorywcz?, wsyzstko dzia?? opr?cz jednej rzeczy - po wej?ciu w ten marker, za kt?rego otrzymamy wyp?at?, otrzymujemy j?, wy?wietla si? wiadomo?? na chacie, ale sam marker nie znika.
Dam piwo za pomoc

.lua:
local markerStart createMarker(-2407.67773, -596.21716132.64844-1"cylinder"1533122)
createBlipAttachedTo(markerStart46)
wystartowane=false

function pracaStart()
    if wystartowane then outputChatBox("Posiadasz aktywn? prac?") return end
    wystartowane=true
    outputChatBox("Rozpocz?to prac?!")
end
addEventHandler("onClientMarkerHit"markerStartpracaStart)

function pracaDalej()
local wyplata math.random(50,100)
    if not wystartowane then return end
    local markerDziad createMarker(-2437.21313, -616.21027132.55675-1'cylinder'2) or false
    createBlip(-2437.21313, -616.21027132.5567541)
    if isElementWithinMarker(localPlayermarkerDziadthen
    outputChatBox("Za poprawnie wykonan? prac? otrzymujesz "..wyplata.."PLN")
    givePlayerMoney(wyplata)
    wystartowane=false
    markerDziad=false
    end
end
addEventHandler("onClientRender"rootpracaDalej)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 14:51


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Zamiast,

markerDziad false

U?yj,

destroyElementmarkerDziad )


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Kuks*
Wysłany: 2018-03-05, 15:05


Kuks*







Wiek: 15
Na forum: 3030 dni
Posty: 246
Nick w MP: Kuks*

Piwa: 2208

Respekt: 115,8
Respekt: 115,8

Ciastuu?, A nie - jednak nie dzia?a xd

[ Dodano: 2018-03-05, 15:16 ]
a w db3 nic

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-05, 21:29


manieks78

Lua ;)






Wiek: 25
Na forum: 3387 dni
Posty: 97
Nick w MP: Hexan

Piwa: 5

Respekt: 50

local markerStart createMarker(-2407.67773, -596.21716132.64844-1"cylinder"1533122)
createBlipAttachedTo(markerStart46)
wystartowane=false

function pracaStart()
    if wystartowane then outputChatBox("Posiadasz aktywn? prac?") return end
    wystartowane=true
    outputChatBox("Rozpocz?to prac?!")
end
addEventHandler("onClientMarkerHit"markerStartpracaStart)

function pracaDalej()
local wyplata math.random(50,100)
    if not wystartowane then return end
    markerDziad createMarker(-2437.21313, -616.21027132.55675-1'cylinder'2) or false
    createBlip(-2437.21313, -616.21027132.5567541)
    if not isElementWithinMarker(localPlayermarkerDziadthen return end
    outputChatBox("Za poprawnie wykonan? prac? otrzymujesz "..wyplata.."PLN")
    givePlayerMoney(wyplata)
    wystartowane=false
    markerDziad=false
    local marker getElementsByType("marker")
    for i,v in ipairs(marker) do
    destroyElement(v)
    end
end
addEventHandler("onClientRender"rootpracaDalej)

Prosz? :D

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Kuks*
Wysłany: 2018-03-06, 06:19


Kuks*







Wiek: 15
Na forum: 3030 dni
Posty: 246
Nick w MP: Kuks*

Piwa: 2208

Respekt: 115,8
Respekt: 115,8

manieks78, A jednak teraz znikn??y mi obydwa markery - ten od rozpocz?cia pracy i ten drugi te?

[ Dodano: 2018-03-06, 06:26 ]
A nawet znikaj? markery wszystkie, na ca?ej mapie

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-06, 11:32


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100


local markerStart createMarker(-2407.67773, -596.21716132.64844-1"cylinder"1533122)
createBlipAttachedTo(markerStart46)
wystartowane=false

function pracaStart()
    if wystartowane then outputChatBox("Posiadasz aktywn? prac?") return end
    wystartowane=true
    outputChatBox("Rozpocz?to prac?!")
end
addEventHandler("onClientMarkerHit"markerStartpracaStart)

function pracaDalej()
local wyplata math.random(50,100)
    if not wystartowane then return end
    local markerDziad createMarker(-2437.21313, -616.21027132.55675-1'cylinder'2) or false
    createBlip(-2437.21313, -616.21027132.5567541)
    if isElementWithinMarker(localPlayermarkerDziadthen
    outputChatBox("Za poprawnie wykonan? prac? otrzymujesz "..wyplata.."PLN")
    givePlayerMoney(wyplata)
    wystartowane=false
    destroyElement(markerDziad)
    end
end
addEventHandler("onClientRender"rootpracaDalej)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-06, 17:08


Kuks*







Wiek: 15
Na forum: 3030 dni
Posty: 246
Nick w MP: Kuks*

Piwa: 2208

Respekt: 115,8
Respekt: 115,8

Aidis, xDD
Popatrz up, to ju? by?o xD

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-06, 17:41


Gpla

Loading...






Wiek: 26
Na forum: 3853 dni
Posty: 84
Nick w MP: Loading...

Piwa: 174

Respekt: 55,3

Kod:


local markerStart = createMarker(-2407.67773, -596.21716, 132.64844-1, "cylinder", 1, 53, 31, 22)
createBlipAttachedTo(markerStart, 46)
wystartowane=false
local markerDziad
local blip

function zakon()
if isElement(markerDziad) then
destroyElement(markerDziad)
markerDziad=nil
end
if isElement(blip) then
destroyElement(blip)
blip=nil
end
end

function pracaStart()
if wystartowane then outputChatBox("Posiadasz aktywn? prac?") return end
wystartowane=true
outputChatBox("Rozpocz?to prac?!")
end
addEventHandler("onClientMarkerHit", markerStart, pracaStart)

function pracaDalej()
local wyplata = math.random(50,100)
if not wystartowane then return end
markerDziad = createMarker(-2437.21313, -616.21027, 132.55675-1, 'cylinder', 2) or false
blip = createBlip(-2437.21313, -616.21027, 132.55675, 41)
if isElementWithinMarker(localPlayer, markerDziad) then
outputChatBox("Za poprawnie wykonan? prac? otrzymujesz "..wyplata.."PLN")
givePlayerMoney(wyplata)
wystartowane=false
zakon()
end
end
addEventHandler("onClientRender", root, pracaDalej)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-06, 17:49


manieks78

Lua ;)






Wiek: 25
Na forum: 3387 dni
Posty: 97
Nick w MP: Hexan

Piwa: 5

Respekt: 50

Hmmm, dziwne z tego co testowa?em m?j kod kt?ry wys?a?em u mnie znikaj? markery stworzone w skrypcie. W takim razie zaraz si? odezw? jak troszeczk? pog?owi? si? przy tym ;) .

Podpis
Jeśli ci pomogłem wynagrodź mnie ;)
Postaw piwo autorowi tego posta
 

 
Tagi: praca :: dorywcza
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Praca dorywcza 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