Witam, mam pewien problem ot?? zrobi?em system prywatnych pojazd?w, dorobi?em jeszcze ?eby tylko blokowa?o te pojazdy kt?re s? dodane w xml a te kt?re przez mape to nie, no okej, ale kod szfankuje.
jak ten kod if getElementData (source, "zezwolenie" ) then dam pod seat to blokuje ka?dego pojazdu na mapie, ale ju? gracz Na G nie mo?e wej?? i w tym problem, jak dam przed seat to Gracz na G mo?e wej?? ale ju? blokuje wszystkie pojazdy.
M?g?by kto? mi poprawi? ten kod?
z g?ry dzi?kuje.!
addEventHandler ( "onVehicleStartEnter", root, function(player,seat,jacked)
if getElementData (source, "zezwolenie" ) then
if seat==0 then
local playeraccount = getPlayerAccount ( player )
auto = getPedOccupiedVehicle ( player )
owner1 = getElementData ( auto, "owner" )
konto = getPlayerAccount ( player )
if not getAccountData(playeraccount, "prawojazdy") then
outputChatBox ("* Nie posiadasz prawa jazdy lub zosta?o ono cofni?te!", player, 255, 0, 0, true)
cancelEvent () return end
--if getAccountData ( konto, "mandaty" ) ~= "2" then
--outputChatBox ("* Posiadasz 3 mandaty lub wi?cej, op?a? je w urz?dzie miasta!",player)
--cancelEvent () return end
if getPlayerName(player) ~= owner1 then
outputChatBox ("* Nie masz kluczy do tego pojazdu!",player)
cancelEvent () return end
end
end
end)
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