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

Wysłany: 2018-10-27, 21:09


JakisPolak199

wieczny student






Wiek: 20
Na forum: 3510 dni
Posty: 131
Nick w MP: bover.

Piwa: 905

Respekt: 150
Respekt: 150Respekt: 150

witam mam skrypt marcina z gtao. lecz nie dziala w db3 pojawia sie komunikat ze w linjce 191 jest blad (s_lua)

s_lua:
[lua] --[[
Autor: bover.
Zakaz zmiany autora, je?li go zmienisz, to przyjedzie do ciebie bover i zje ci siusiaka :x .
--]]
pozycje = { -- x,y,z zaladowania pojazdu, y rozladowania pojazdu
[429] = {0,-0.9,0.4, 6}, -- banshee
[402] = {0,-0.9,0.6, 6}, -- buffalo
[541] = {0,-0.9,0.4,6}, -- bullet
[475] = {0,-0.9,0.4,6}, -- sabre
[457] = {0,-1.3,0.4,6}, -- caddy wozek golfowy
[568] = {0,-0.8,0.6,6}, -- bandito
[426] = {0,-0.7,0.5,6}, -- premier
[602] = {0,-0.9,0.6,6}, -- alpha
[415] = {0,-0.9,0.6,6}, -- cheetah
[480] = {0,-0.9,0.6,6}, -- comet
[562] = {0,0.9,0.6,6}, -- elegy
[587] = {0,0.9,0.6,6}, -- euros
[565] = {0,0.9,0.6,6}, -- flash
[411] = {0,0.9,0.6,6}, -- infernus
[559] = {0,0.9,0.6,6}, -- jester
[603] = {0,0.9,0.6,6}, -- pheonix
[560] = {0,0.9,0.6,6}, -- sultan
[506] = {0,0.9,0.6,6}, -- super gt
[451] = {0,0.9,0.6,6}, -- turismo
[558] = {0,0.9,0.6,6}, -- uranus
[555] = {0,0.9,0.6,6}, -- windsor
[477] = {0,0.9,0.6,6}, -- zr 350
[536] = {0,0.9,0.6,6}, -- blade
[575] = {0,0.9,0.6,6}, -- brodway
[518] = {0,0.9,0.6,6}, -- buccaner
[419] = {0,0.9,0.6,6}, -- esperanto
[534] = {0,0.9,0.6,6}, -- remington
[567] = {0,0.9,0.6,6}, -- savanna
[535] = {0,0.9,0.6,6}, -- slamvan
[576] = {0,0.9,0.6,6}, -- tornado
[412] = {0,0.9,0.6,6}, -- voodo
[496] = {0,0.9,0.6,6}, -- blista
[401] = {0,0.9,0.6,6}, -- bravura
[527] = {0,0.9,0.6,6}, -- cadrona
[542] = {0,0.9,0.6,6}, -- clover
[533] = {0,0.9,0.6,6}, -- feltzer
[526] = {0,0.9,0.6,6}, -- fortune
[474] = {0,0.9,0.6,6}, -- hermes
[545] = {0,0.9,0.6,6}, -- hustler
[517] = {0,0.9,0.6,6}, -- majestic
[410] = {0,0.9,0.6,6}, -- manana
[436] = {0,0.9,0.6,6}, -- previon
[439] = {0,0.9,0.6,6}, -- stalion
[549] = {0,0.9,0.6,6}, -- tampa
[491] = {0,0.9,0.6,6}, -- virgo
[445] = {0,0.9,0.6,6}, -- admiral
[438] = {0,0.9,0.6,6}, -- cabbie
[507] = {0,0.9,0.6,6}, -- elegant
[585] = {0,0.9,0.6,6}, -- emperor
[466] = {0,0.9,0.6,6}, -- glendale
[492] = {0,0.9,0.6,6}, -- greenwood
[546] = {0,0.9,0.6,6}, -- intruder
[551] = {0,0.9,0.6,6}, -- merit
[516] = {0,0.9,0.6,6}, -- nebula
[467] = {0,0.9,0.6,6}, -- oceanic
[547] = {0,0.5,0.5,6}, -- primo
[405] = {0,0.9,0.6,6}, -- sentinel
[580] = {0,0.9,0.6,6}, -- stafford
[409] = {0,0.9,0.6,6}, -- streetch
[550] = {0,0.9,0.6,6}, -- surnise
[566] = {0,0.9,0.6,6}, -- tahoma
[420] = {0,0.9,0.6,6}, -- taxi
[540] = {0,0.9,0.6,6}, -- vincent
[421] = {0,0.9,0.6,6}, -- washington
[529] = {0,0.9,0.6,6}, -- willard
[589] = {0,0.9,0.6,6}, -- club
[579] = {0,0.9,0.6,6}, -- huntley
[400] = {0,0.9,0.6,6}, -- landstalker
[500] = {0,0.9,0.6,6}, -- mesa
[470] = {0,0.9,0.6,6}, -- patriot
[404] = {0,0.9,0.6,6}, -- perrenial
[489] = {0,0.9,0.6,6}, -- rancher
[479] = {0,0.9,0.6,6}, -- regina
[442] = {0,0.9,0.6,6}, -- romero
[495] = {0,0.9,0.6,6}, -- sandking
[458] = {0,0.9,0.6,6}, -- solair
[561] = {0,0.9,0.6,6}, -- stratum
[539] = {0,0.9,0.6,6}, -- vortex
[583] = {0,0.9,0.6,6}, -- tug
[531] = {0,0.9,0.6,6}, -- tractor
[571] = {0,0.9,0.6,6}, -- kart
[423] = {0,0.9,0.6,6}, -- mrwhoope
[572] = {0,0.9,0.6,6}, -- mover
[434] = {0,0.9,0.6,6}, -- hotknife
[588] = {0,0.9,0.6,6}, -- hotdog
[504] = {0,0.9,0.6,6}, -- rozwalka w krwawym ringu
[424] = {0,0.9,0.6,6}, -- bf injection
[485] = {0,0.9,0.6,6}, -- bagage
[525] = {0,0.9,0.6,6}, -- towtruck
[552] = {0,0.9,0.6,6}, -- utility van
[530] = {0,0.9,0.6,6}, -- forklift
[574] = {0,0.9,0.6,6}, -- sweeper
[422] = {0,0.9,0.6,6}, -- bobcat
[600] = {0,0.9,0.6,6}, -- picador
[543] = {0,0.9,0.6,6}, -- sadler
[478] = {0,0.9,0.6,6}, -- walton
[554] = {0,0.9,0.6,6}, -- yosemite
[459] = {0,0.9,0.6,6}, -- Berkley's RC Van
[482] = {0,0.9,0.6,6}, -- burrito
[483] = {0,0.9,0.6,6}, -- camper
[418] = {0,0.9,0.6,6}, -- moonbeam
[582] = {0,0.9,0.6,6}, -- news van
[413] = {0,0.9,0.6,6}, -- pony
[601] = {0,0.9,0.6,6}, -- swat
[432] = {0,0.9,0.6,6}, -- rhino
[599] = {0,0.9,0.6,6}, -- police ranger
[597] = {0,0.9,0.6,6}, -- police sf
[598] = {0,0.9,0.6,6}, -- police lv
[596] = {0,0.9,0.6,6}, -- police ls
[528] = {0,0.9,0.6,6}, -- fbi truck
[490] = {0,0.9,0.6,6}, -- fbi rancher
--[] = {0,0.9,0.6,6}, --
--[] = {0,0.9,0.6,6}, --

}


sphere = {}
szyna = {}
szyna2 = {}



setTimer(function()
for k,v in pairs(getElementsByType("vehicle")) do
if getElementModel(v) == 578 then
woz = v
if not getElementData(woz, "colShape") then
sphere[woz] = createColSphere(0,0,0,3.5)
attachElements(sphere[woz], woz, 0,-7.5,0.2)
setElementData(woz, "colShape", true)
end
if not getElementData(woz, "szyna") then
szyna[woz] = createObject(2893, 0,0,0,343,354,357)
szyna2[woz] = createObject(2893,0,0,0,343,354,357)
attachElements(szyna[woz], woz, 1, -5,-0.3)
attachElements(szyna2[woz], woz, -1,-5,-0.3)
setElementCollisionsEnabled(szyna[woz], false)
setElementCollisionsEnabled(szyna2[woz], false)
setElementAlpha(szyna[woz], 0)
setElementAlpha(szyna2[woz], 0)
setElementData(woz, "szyna", true)
end
if not woz then
destroyElement(sphere[woz])
sphere[woz] = nil
end
end
end
end, 5*1000, 0)



addEventHandler("onVehicleEnter",root,function()
if getElementModel(source) == 578 then
if not getElementData(source, "colShape") then else return end
woz = source
sphere[woz] = createColSphere(0,0,0,3.5)
attachElements(sphere[woz], woz, 0,-7.5,0.2)
setElementData(woz, "colShape", true)
if not woz then
destroyElement(sphere[woz])
sphere[woz] = nil
end
szyna[woz] = createObject(2893, 0,0,0,343,354,357)
szyna2[woz] = createObject(2893,0,0,0,343,354,357)
attachElements(szyna[woz], woz, 1, -5,-0.3)
attachElements(szyna2[woz], woz, -1,-5,-0.3)
setElementCollisionsEnabled(szyna[woz], false)
setElementCollisionsEnabled(szyna2[woz], false)
setElementAlpha(szyna[woz], 0)
setElementAlpha(szyna2[woz], 0)
setElementData(woz, "szyna", true)
end
end)


vehicles = {}

addCommandHandler("zaladuj",function(plr)
if isPedInVehicle(plr) then
local veh = getPedOccupiedVehicle(plr)
if veh then
if getElementModel(veh) == 578 then
if not getElementData(veh, "loading") then
vehicles[veh] = getElementsWithinColShape(sphere[woz], "vehicle")
if #vehicles[veh] == 1 then
local model = getElementModel(vehicles[veh][1])
if pozycje[model] then
setElementData(veh, "loading", true)
local rx,ry,rz = getElementRotation(veh)
setElementRotation(vehicles[veh][1], rx,ry,rz)
setElementAlpha(szyna[woz], 255)
setElementAlpha(szyna2[woz],255)
outputChatBox("Trwa ?adowanie pojazdu.",plr,255,255,255)
fadeCamera(plr, false, 1.0)
setTimer(function()
attachElements(vehicles[veh][1], veh, pozycje[model][1], pozycje[model][2], pozycje[model][3])
setElementFrozen(vehicles[veh][1], true)
end, 2*1000, 1)
setTimer(function(plr)
fadeCamera(plr, true, 11.0)
outputChatBox("Pojazd zosta? za?adowany.",plr,255,255,255)
setElementAlpha(szyna[woz], 0)
setElementAlpha(szyna2[woz], 0)
end, 8*1000, 1, plr)
end
end
end
end
end
end
end)



addCommandHandler("rozladuj",function(plr)
if isPedInVehicle(plr) then
local veh = getPedOccupiedVehicle(plr)
if veh then
if vehicles[veh] ~= nil then
if getElementData(veh, "loading") then
setElementData(veh, "loading", false)
local model = getElementModel(vehicles[veh][1])
setElementAlpha(szyna[woz], 255)
setElementAlpha(szyna2[woz], 255)
outputChatBox("Trwa roz?adowywanie pojazdu.",plr,255,255,255)
fadeCamera(plr, false, 1.0)
setTimer(function()
detachElements(vehicles[veh][1])
local x,y,z = getElementPosition(veh)
setElementPosition(vehicles[veh][1], x,y-pozycje[model][4],z)
setElementFrozen(vehicles[veh][1], false)
vehicles[veh] = nil
end, 2*1000, 1)
setTimer(function(plr)
outputChatBox("Roz?adowano pojazd.",plr,255,255,255)
fadeCamera(plr, true, 11.0)
setElementAlpha(szyna[woz], 0)
setElementAlpha(szyna2[woz], 0)
end,8*1000, 1,plr)
else
outputChatBox("Na lawecie nie ma ?adnego pojazdu.",plr,255,255,255)
end
end
else
outputChatBox("Nie jeste? w poje?dzie.",plr,255,255,255)
end
end
end)

addEventHandler("onResourceStop",resourceRoot,function()
for k,veh in pairs(getElementsByType("vehicle")) do
if getElementModel(veh) == 578 then
if getElementData(veh, "colShape") then
local elems = getAttachedElements(veh)[4]
if elems then
if getElementType(elems) == "vehicle" then
if getElementData(veh, "loading") then
detachElements(elems)
setElementFrozen(elems, false)
vehicles = {}
setElementData(veh, "loading", false)
setElementData(veh, "colShape", false)
destroyElement(szyna[veh])
destroyElement(szyna2[veh])
setElementData(veh, "szyna", false)
end
end
end
end
end
end
end)

function sprawdzTyp(veh)
if getElementType(veh) == "vehicle" then
local at = getAttachedElements(veh)
for k,v in pairs(at) do
if getElementType(v) == "vehicle" then
return v
end
break
end
end
end

setTimer(function()
triggerClientEvent(root, "sprawdzMiejsce", root)
end, 10*1000, 0)

addEventHandler("onResourceStart",root,function()
for k,v in pairs(getElementsByType("player")) do
bindKey(v,"num_8", "down", "rozladuj")
bindKey(v,"num_2", "down", "zaladuj")
end
end)

addEventHandler("onPlayerJoin",root,function()
bindKey(source,"num_8", "down", "rozladuj")
bindKey(source,"num_2", "down", "zaladuj")
end) [\lua]

za pomoc stawiam :piwo:

Podpis
Kontakt mailowo: [email protected]
Kontakt Discord: bover.

Portfolio: https://boversoneg.github.io/

socialproject.pl // discord.gg/socialproject
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-27, 21:12


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Podaj tre?? b??du.
Stosuj znaczniki [.lua] oraz [./lua], pomyli?a Ci si? strona 'uko?nika'.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-27, 21:46


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

"Wilq" napisał/a:

Podaj tre?? b??du.
Stosuj znaczniki [.lua] oraz [./lua], pomyli?a Ci si? strona 'uko?nika'.

oraz wska? linijk?/linijki w kt?rych wywala b??d

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: dziala :: laweta
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