Wysłany: 2020-02-18, 06:45
vAnimo
Zielony w luła
Wiek: 19 Na forum: 2312 dni Posty: 165
Nick w MP: vAnimo
Piwa : 882
Siedzia?em 3 godziny pr?bujac usun?? auto ?e streetview ale bez skutku pomoglby kto? postawie piwko? Praca najlepiej z GM PSRPG 2.0 San fierro nazwa folderu: psrpg-praca-streetview
Wysłany: 2020-02-18, 10:00
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Wstaw kod tego z czym masz problem i ewentualne b??dy /debugscript 3.
Więcej szczegółów
Wystawiono 1 piw(a):vAnimo
Wysłany: 2020-02-18, 13:53
vAnimo
Zielony w luła
Wiek: 19 Na forum: 2312 dni Posty: 165
Nick w MP: vAnimo
Piwa : 882
No w?a?nie w tym problem, ?e b??du nie ma...
Chodzi mi o to ?eby kto? mi pom?g? zrobi? tak, aby zamiast autem na streetview biega?
Link do sk:https://www96.zippyshare.com/v/p9DujiOE/file.html
Wysłany: 2020-02-18, 13:57
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Generalnie tutaj pomagamy edytowa? kod a nie piszemy go za kogo?. Je?li szukasz gotowego skryptu to id? do GIE?DY lub Szukam zasobu MTA. Osobi?cie mog? zaoferowa? pomoc, pisz na dsc Wilq#9444
Wysłany: 2020-02-18, 14:06
vAnimo
Zielony w luła
Wiek: 19 Na forum: 2312 dni Posty: 165
Nick w MP: vAnimo
Piwa : 882
"Wilq" napisał/a :Generalnie tutaj pomagamy"""" edytowa? kod """"a nie piszemy go za kogo?. Je?li szukasz gotowego skryptu to id? do GIE?DY lub Szukam zasobu MTA. Osobi?cie mog? zaoferowa? pomoc, pisz na dsc Wilq#9444
No ja chce wlasnie z tego skrypta wywalic auta a nie zeby go pisac od nowa
Wysłany: 2020-02-18, 14:21
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
No to musisz sprawdza? czy gracz chodzi
Więcej informacji znajdziesz w Wikipedii MTA: getKeyState
albo
I wtedy zwi?ksza? stan street view czy tam ilo?? danych.
Sprawdzaj od razu czy gracz NIE jest w poje?dzie.
Wysłany: 2020-02-18, 16:00
vAnimo
Zielony w luła
Wiek: 19 Na forum: 2312 dni Posty: 165
Nick w MP: vAnimo
Piwa : 882
Ale po co mam sprawdzac czy chodzi jak ja chce zeby jak wchodzisz w prace to zeby sie auto nie respilo tutaj kod
Kod: local code = "StreetView"
local districtsBus = {
{-1855.48, 1383.84, 7.11},
{-1901.81, 1331.69, 6.97},
{-1989.58, 1312.00, 6.97},
{-2073.47, 1320.56, 6.99},
{-2157.06, 1335.33, 6.98},
{-2262.45, 1336.16, 6.98},
{-2344.52, 1378.88, 6.97},
{-2370.14, 1348.77, 9.75},
{-2369.45, 1283.11, 22.38},
{-2369.58, 1208.91, 36.37},
{-2341.24, 1173.89, 45.20},
{-2279.46, 1173.37, 55.62},
{-2193.97, 1173.67, 55.51},
{-2093.91, 1173.20, 51.47},
{-1977.48, 1173.85, 45.23},
{-1863.73, 1175.09, 44.39},
{-1760.47, 1183.47, 24.89},
{-1662.27, 1183.56, 11.83},
{-1609.02, 1161.55, 6.98},
{-1600.39, 1082.13, 6.97},
{-1581.32, 986.53, 6.97},
{-1537.54, 930.38, 6.97},
{-1545.86, 983.03, 6.97},
{-1581.53, 1064.46, 6.98},
{-1584.01, 1176.83, 6.97},
{-1659.36, 1277.25, 6.97},
{-1752.83, 1366.23, 6.97},
{-1837.77, 1388.25, 7.13},
{-1835.25, 1424.87, 7.11},
}
local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus
function odleglosc()
local x,y,z = getElementPosition(localPlayer)
local mx,my,mz = getElementPosition(jobMarker)
local distance = getDistanceBetweenPoints3D(x,y,z,mx,my,mz)
if distance > 600 then
triggerEvent('onClientAddNotification', localPlayer, 'Odjecha?e? zadaleko od punktu.', 'error')
finishJob()
end
end
function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end
if jobBlip and isElement(jobBlip) then
destroyElement(jobBlip)
jobBlip = nil
end
if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0
end
if getElementData(localPlayer,"player:job") == code then
setElementData(localPlayer,"player:job",false)
end
triggerServerEvent("destroyVeh", localPlayer)
removeEventHandler("onClientRender",root,odleglosc)
end
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(),finishJob)
addEvent("finishJob",true)
addEventHandler("finishJob",root,function(plr)
if plr ~= localPlayer then return end
finishJob()
end)
function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxTarget and getPedOccupiedVehicle(el) then return end
if jobTarget == maxTarget and not getPedOccupiedVehicle(el) then return end
if jobTarget == #districtsBus then
triggerServerEvent("daj:punkty:sv", localPlayer, localPlayer)
finishJob()
playSoundFrontEnd(5)
triggerEvent('onClientAddNotification', localPlayer, 'Pomy?lnie zako?czono prac?:#00c005\nKierowca pojazdu Street View', 'success')
else
local kasa = math.random(22000,33000)
local premka = math.random(35000,43000)
local premkaplus = math.random(45000,60000)
showMarker()
playSoundFrontEnd(12)
if getElementData(localPlayer, "player:premium") then
triggerServerEvent("givePlayerMoney", localPlayer, premka)
triggerEvent('onClientAddNotification', localPlayer, 'Za dojechanie do punktu otrzymujesz,\nwynagrodzenie w postaci: #00c005'..premka..' $#FFFFFF', 'success')
setElementData(el,"player:srp", getElementData(el,"player:srp")+math.random(0,2))
elseif getElementData(localPlayer, "player:premiumplus") then
triggerServerEvent("givePlayerMoney", localPlayer, premkaplus)
triggerEvent('onClientAddNotification', localPlayer, 'Za dojechanie do punktu otrzymujesz,\nwynagrodzenie w postaci: #00c005'..premkaplus..' $#FFFFFF', 'success')
setElementData(el,"player:srp", getElementData(el,"player:srp")+math.random(0,3))
else
triggerServerEvent("givePlayerMoney", localPlayer, kasa)
triggerEvent('onClientAddNotification', localPlayer, 'Za dojechanie do punktu otrzymujesz,\nwynagrodzenie w postaci: #00c005'..kasa..' $#FFFFFF', 'success')
setElementData(el,"player:srp", getElementData(el,"player:srp")+math.random(0,1))
end
end
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
jobTarget = jobTarget + 1
jobMarker = createMarker(districtsBus[jobTarget][1], districtsBus[jobTarget][2], districtsBus[jobTarget][3]-1, "corona", 4, 0, 122, 255,200)
jobBlip = createBlip(districtsBus[jobTarget][1], districtsBus[jobTarget][2], districtsBus[jobTarget][3], 41)
if districtsBus[jobTarget+1] then
ile = districtsBus[jobTarget+1]
ile2 = ile[1]
ile3 = ile[2]
ile4 = ile[3]
setMarkerTarget(jobMarker, ile[1], ile[2], ile[3])
end
addEventHandler("onClientMarkerHit", jobMarker, busDriver)
end
addEvent("STARTJobBus", true)
addEventHandler("STARTJobBus", resourceRoot, function(veh)
triggerEvent( "onClientAddNotification", localPlayer, "Pomy?lnie rozpocz?to prac?:#00c005\nKierowca pojazdu Street View#FFFFFF\nUdaj si? do pierwszego punktu.", "success" )
jobVehicle = veh
jobTarget = 0
showMarker()
addEventHandler("onClientRender",root,odleglosc)
end)
addEventHandler("onClientResourceStop", resourceRoot, function()
if jobVehicle and getElementData(localPlayer, "player:job") then
setElementData(localPlayer, "player:job", false)
end
end)
addEventHandler("onClientVehicleExit", resourceRoot, function(plr, seat)
if seat == 0 then
if plr == localPlayer then
finishJob()
triggerEvent('onClientAddNotification', localPlayer, 'Pomy?lnie zako?czono prac?:#00c005\nKierowca pojazdu Street View', 'success')
setElementPosition(localPlayer, -1868.96, 1430.96, 7.18)
end
end
end)
Co mam zrobic zeby sie nie respi?o si? auto i gracz mogl pracowac pieszo
Wysłany: 2020-02-18, 16:09
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Wystarczy, ?e usuniesz tworzenie pojazdu (createVehicle) i wsz?dzie usun sprawdzanie, czy gracz jest w poje?dzie. Musisz tam sprawdza? czy gracz NIE JEST w tym poje?dzie. Przy ka?dym (getPedOccupiedVehicle) musisz to zrobi?.
Wysłany: 2020-02-18, 16:37
vAnimo
Zielony w luła
Wiek: 19 Na forum: 2312 dni Posty: 165
Nick w MP: vAnimo
Piwa : 882
Nie wiem, jestem na to za g?upi nic mi nie dziala wchodze w blipa i nic ..
Tagi: usunięcie :: auta :: streetview
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: