Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: [element
1. [Element,onMarkerHit]
Witam, pisz?c skrypt odpowiadaj?cy za prawo jazdy napotka?em pewien problem.
Chodzi o to, ?e je?li oboj?tnie jaki element ( gracz, pojazd ) wejdzie markera to skrypt wykonuje dan? funkcje 2 razy. W tym skrypcie tworzy w?a?nie po 2/ wi?cej marker?w.

Kod do danej funkcji
server
[code]function pojazd ( source, cmd )
local playeraccount = getPlayerAccount ( source )
if ( playeraccount ) and not isGuestAccount ( playeraccount ) then
if not getAccountData ( playeraccount, "prawko4543" ) then
if isElementWithinMarker ( source, marker ) then
if cmd == "akceptuj" then
auto = createVehicle ( 410, -83, 1076, 19 )
instruktor = createPed ( 17, 0, 0, 1 )
warpPedIntoVehicle ( instruktor, auto )
warpPedIntoVehicle ( source, auto )
outputChatBox ( "#ffffffUdaj si? na miejsce startu ! ( #ff0000Czerwony punkt#ffffff )", source, 255, 255, 255, true )
outputChatBox ( "#ffffffPami?taj, ?e je?li uszkodzisz sw?j pojazd wi?cej niz 10% w d?? - #ff0000NIE ZDASZ!", source, 255, 255, 255, true )
pojazd ( player, hitElement, matchingDimension, vehicle )
end
end
else
outputChatBox ( "#ffffffZdawa?e? ju? prawo jazdy i zako?czy?e? je wynikiem #00ff00Pozytywnym#ffffff ! Id? szukaj pracy.", source, 255, 255, 255, true )
end
end
end
addCommandHandler ( "akceptuj", pojazd )

function pojazd ( player, hitElement, matchingDimension, vehicle )
setVehicleColor ( auto, 255, 255, 255 )
marker1 = createMarker ( -86, 1095, 19, ...