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

Wysłany: 2015-05-30, 22:54


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4386 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

function frezeBus(el)
 local p=getPedOccupiedVehicle(el)
       outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Dowioz?e? Pizze.",255,255,255, true)
       setElementFrozen(p, true)
       setTimer(setElementFrozen, 10000, 1, p, false)
       outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !!",255,255,255, true)
       end


Mam owy kawa?ek skryptu ale mi nie dzia?a jedna zecz ja bym chcia? aby si? ten tekst

outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !!",255,255,255, true)


wy?wietla? po odmro?eniu pojazdu a nie razem z 1 tekstem

outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Dowioz?e? Pizze.",255,255,255, true)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:00


Loop

Inspektor






Wiek: 28
Na forum: 4430 dni
Posty: 311
Nick w MP: Inspektor

Piwa: 201

Respekt: 130
Respekt: 130

Oczywi?cie sprawdz


setTimer(outputChatBox,10000, 1,("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !!",255,255,255, true)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:11


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4386 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

Loop,

Teraz wyskoczy? mi ERROR

ERROR: Loading script failed: praca_pizzaboy\pizza_c.lua:82:')' expected near ','


local districtsPizza = { ---- kordy dostarczania graczy
    {-291.1318359375, 1163.7275390625, 19.696998596191},
    {-335.0615234375, 1171.697265625, 19.901586532593},
    {-320.7666015625, 1163.1123046875, 20.2421875},
    {-364.9287109375, 1165.5341796875, 19.7421875},
    {-367.416015625, 1145.8359375, 20.235286712646},
    {-359.54296875, 1129.7119140625, 19.679533004761},
    {-369.2392578125, 1119.2783203125, 20.230415344238},
    {-361.92578125, 1104.31640625, 19.749286651611},
    {-331.36328125, 1115.37890625, 20.2421875},
    {-322.1962890625, 1130.2138671875, 19.83712387085},
    {-289.51171875, 1122.337890625, 20.238082885742},
    {-304.302734375, 1114.52734375, 19.7421875},
    {-260.83984375, 1165.4375, 20.2421875},
    {-251.5693359375, 1179.39453125, 19.93016242981},
    {-259.517578125, 1156.6357421875, 19.7421875},
    {-251.677734375, 1142.8095703125, 20.243007659912},
    {-260.6396484375, 1130.6669921875, 19.759662628174},
    {-253.7919921875, 1115.990234375, 20.232286453247},
    {-248.8818359375, 1083.751953125, 19.902923583984},
    {-262.7373046875, 1076.2373046875, 20.249408721924},
    {-252.0732421875, 1054.12109375, 19.956705093384},
    {-260.552734375, 1040.31640625, 20.2421875},
    {-282.9853515625, 995.6962890625, 20.2421875},
    {-267.791015625, 1004.333984375, 19.679946899414},
    {-256.2158203125, 994.55859375, 20.239133834839},
    {-242.8115234375, 1002.1748046875, 19.7421875},
}
local jobBlip
local jobMarker
local jobVehicle
local maxTarget = #districtsPizza

function finishJob()
    if jobMarker and isElement(jobMarker) then
        destroyElement(jobMarker)
        jobMarker = nil
    end
    
        if jobBlip and isElement(jobBlip) then
        destroyElement(jobBlip)
        jobBlip = nil
        end

triggerServerEvent("destroyVeh", localPlayer)

end


function busDriver(el, md)
    if el ~= localPlayer or not md then return end
if not getPedOccupiedVehicle(el) then return end
        showMarker()
        playSoundFrontEnd(12)
        triggerServerEvent("givePlayerMoney", localPlayer, 3, 1)
    end

function showMarker()
    if jobMarker and isElement(jobMarker) then
        destroyElement(jobMarker)
        jobMarker = nil
    end
  if jobBlip and isElement(jobBlip) then
        destroyElement(jobBlip)
        jobBlip = nil
    end
  
    los = math.random(1, #districtsPizza)
    jobMarker = createMarker(districtsPizza[los][1], districtsPizza[los][2], districtsPizza[los][3], "checkpoint", 3.2, 0, 150, 255,100,52)
    jobBlip = createBlipAttachedTo(jobMarker, 41)

    
    addEventHandler("onClientMarkerHit", jobMarker, busDriver)
    addEventHandler("onClientMarkerHit", jobMarker, frezeBus)
end

function frezeBus(el)
 local p=getPedOccupiedVehicle(el)
       outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Dowioz?e? Pizze.",255,255,255, true)
       setElementFrozen(p, true)
       setTimer(setElementFrozen, 10000, 1, p, false)
       setTimer(outputChatBox,10000, 1,("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !!",255,255,255, true)
       end
       

addEvent("STARTJobBus", true)
addEventHandler("STARTJobBus", resourceRoot, function(veh)
    outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Rozpocz??e?/a? prac?.",255,255,255, true)
    jobVehicle = veh
    showMarker()
end)

addEventHandler("onClientResourceStop", resourceRoot, function()
    if jobVehicle and getElementData(localPlayer, "gracz_praca") then
        setElementData(localPlayer, "gracz_praca", false)
    end
end)

addEventHandler("onClientVehicleExit", resourceRoot, function(plr, seat)
    if seat == 0 then
        if plr == localPlayer then
            finishJob()
            outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Zako?czy?e? prac?",255,255,255, true)
            end
        end
   end)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:15


Loop

Inspektor






Wiek: 28
Na forum: 4430 dni
Posty: 311
Nick w MP: Inspektor

Piwa: 201

Respekt: 130
Respekt: 130



setTimer(outputChatBox,10000, 1,("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !!",255,255,255, true))


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:20


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4386 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

Nadal jest ten ERROR

ERROR: Loading script failed: praca_pizzaboy\pizza_c.lua:82:')' expected near ','

ten ERROR wyskakuje w debugscript 3

local districtsPizza = { ---- kordy dostarczania graczy
    {-291.1318359375, 1163.7275390625, 19.696998596191},
    {-335.0615234375, 1171.697265625, 19.901586532593},
    {-320.7666015625, 1163.1123046875, 20.2421875},
    {-364.9287109375, 1165.5341796875, 19.7421875},
    {-367.416015625, 1145.8359375, 20.235286712646},
    {-359.54296875, 1129.7119140625, 19.679533004761},
    {-369.2392578125, 1119.2783203125, 20.230415344238},
    {-361.92578125, 1104.31640625, 19.749286651611},
    {-331.36328125, 1115.37890625, 20.2421875},
    {-322.1962890625, 1130.2138671875, 19.83712387085},
    {-289.51171875, 1122.337890625, 20.238082885742},
    {-304.302734375, 1114.52734375, 19.7421875},
    {-260.83984375, 1165.4375, 20.2421875},
    {-251.5693359375, 1179.39453125, 19.93016242981},
    {-259.517578125, 1156.6357421875, 19.7421875},
    {-251.677734375, 1142.8095703125, 20.243007659912},
    {-260.6396484375, 1130.6669921875, 19.759662628174},
    {-253.7919921875, 1115.990234375, 20.232286453247},
    {-248.8818359375, 1083.751953125, 19.902923583984},
    {-262.7373046875, 1076.2373046875, 20.249408721924},
    {-252.0732421875, 1054.12109375, 19.956705093384},
    {-260.552734375, 1040.31640625, 20.2421875},
    {-282.9853515625, 995.6962890625, 20.2421875},
    {-267.791015625, 1004.333984375, 19.679946899414},
    {-256.2158203125, 994.55859375, 20.239133834839},
    {-242.8115234375, 1002.1748046875, 19.7421875},
}
local jobBlip
local jobMarker
local jobVehicle
local maxTarget = #districtsPizza

function finishJob()
    if jobMarker and isElement(jobMarker) then
        destroyElement(jobMarker)
        jobMarker = nil
    end
    
        if jobBlip and isElement(jobBlip) then
        destroyElement(jobBlip)
        jobBlip = nil
        end

triggerServerEvent("destroyVeh", localPlayer)

end


function busDriver(el, md)
    if el ~= localPlayer or not md then return end
if not getPedOccupiedVehicle(el) then return end
        showMarker()
        playSoundFrontEnd(12)
        triggerServerEvent("givePlayerMoney", localPlayer, 3, 1)
    end

function showMarker()
    if jobMarker and isElement(jobMarker) then
        destroyElement(jobMarker)
        jobMarker = nil
    end
  if jobBlip and isElement(jobBlip) then
        destroyElement(jobBlip)
        jobBlip = nil
    end
  
    los = math.random(1, #districtsPizza)
    jobMarker = createMarker(districtsPizza[los][1], districtsPizza[los][2], districtsPizza[los][3], "checkpoint", 3.2, 0, 150, 255,100,52)
    jobBlip = createBlipAttachedTo(jobMarker, 41)

    
    addEventHandler("onClientMarkerHit", jobMarker, busDriver)
    addEventHandler("onClientMarkerHit", jobMarker, frezeBus)
end

function frezeBus(el)
 local p=getPedOccupiedVehicle(el)
       outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Dowioz?e? Pizze.",255,255,255, true)
       setElementFrozen(p, true)
       setTimer(setElementFrozen, 10000, 1, p, false)
       setTimer(outputChatBox,10000, 1,("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !!",255,255,255, true))
       end
       

addEvent("STARTJobBus", true)
addEventHandler("STARTJobBus", resourceRoot, function(veh)
    outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Rozpocz??e?/a? prac?.",255,255,255, true)
    jobVehicle = veh
    showMarker()
end)

addEventHandler("onClientResourceStop", resourceRoot, function()
    if jobVehicle and getElementData(localPlayer, "gracz_praca") then
        setElementData(localPlayer, "gracz_praca", false)
    end
end)

addEventHandler("onClientVehicleExit", resourceRoot, function(plr, seat)
    if seat == 0 then
        if plr == localPlayer then
            finishJob()
            outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Zako?czy?e? prac?",255,255,255, true)
            end
        end
   end)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:24


Loop

Inspektor






Wiek: 28
Na forum: 4430 dni
Posty: 311
Nick w MP: Inspektor

Piwa: 201

Respekt: 130
Respekt: 130

dobra to teraz zamiast tego starego zrob tak

setTimer(function()
outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !!",255,255,255, true)
end, 10000, 1)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:26


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4386 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

function frezeBus(el)
 local p=getPedOccupiedVehicle(el)
       outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Dowioz?e? Pizze.",255,255,255, true)
       setElementFrozen(p, true)
       setTimer(setElementFrozen, 10000, 1, p, false)
       setTimer(function() 
       outputChatBox("[#0033ffPraca#FFFFFF]#ffff99*Pizza Dostarczona. Jedz dalej !! ",255,255,255, true) 
       end, 10000, 1)
       end


To ma tak wygl?da? ??

Temat do Zamkni?cia !!


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:30


Loop

Inspektor






Wiek: 28
Na forum: 4430 dni
Posty: 311
Nick w MP: Inspektor

Piwa: 201

Respekt: 130
Respekt: 130

Yes

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-30, 23:33


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4386 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

Temat do Zamkni?cia !!


Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: tekst :: praca
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