Guten Tag,
Ich habe bemerkt, dass in der Allround.lua in der Zeile 500 ein Fehler ist:
Lua
function createFactionVehicle ( model, x, y, z, rx, ry, rz, faction, c1, c2, c3, c4, numberplate )
if not c3 then
c3 = 0
end
if not c4 then
c4 = 0
end
if not numberplate then
numberplate = fraktionNames[faction]
end
local veh = createVehicle ( model, x, y, z, rx, ry, rz, numberplate )
setVehicleColor ( veh, c1, c2, c3, c4 )
setElementHealth ( veh, 1700 )
setVehiclePaintjob ( veh, 3 )
toggleVehicleRespawn ( veh, true )
setVehicleRespawnDelay ( veh, FCarDestroyRespawn * 1000 * 60 )
setVehicleIdleRespawnDelay ( veh, FCarIdleRespawn * 1000 * 60 )
factionVehicles[faction][veh] = true
vioSetElementData ( veh, "owner", fraktionNames[faction] )
vioSetElementData ( veh, "ownerfraktion", faction )
--vioSetElementData ( veh, "sportmotor", ( faction == 10 and 3 or 2 ) )
--vioSetElementData ( veh, "bremse", ( faction == 10 and 3 or 2 ) )
--vioSetElementData ( veh, "antrieb", "awd" )
setElementFrozen ( veh, true )
if faction ~= 1 and faction ~= 6 and faction ~= 8 then
addEventHandler ( "onVehicleStartEnter", veh, function ( player, seat, jacked )
if seat == 0 and vioGetElementData ( player, "fraktion" ) ~= faction then
if not jacked then
cancelEvent ()
end
else
setElementFrozen ( source, false )
end
end )
addEventHandler ( "onVehicleEnter", veh, function ( player, seat, jacked )
if seat == 0 and vioGetElementData ( player, "fraktion" ) ~= faction and jacked then
setElementVelocity ( source, 0, 0, 0 )
setControlState ( player, "enter_exit", false )
setTimer ( removePedFromVehicle, 750, 1, player )
setTimer ( setControlState, 150, 1, player, "enter_exit", false )
setTimer ( setControlState, 200, 1, player, "enter_exit", true )
setTimer ( setControlState, 700, 1, player, "enter_exit", false )
infobox ( player, "Du bist keiner\nvon "..fraktionNames[faction].."!", 4000, 255, 0, 0 )
end
end )
else
addEventHandler ( "onVehicleStartEnter", veh, function ( player, seat, jacked )
if seat == 0 and not isOnDuty ( player ) then
if not jacked then
cancelEvent ()
end
else
setElementFrozen ( source, false )
end
end )
addEventHandler ( "onVehicleEnter", veh, function ( player, seat, jacked )
if seat == 0 and not isOnDuty ( player ) and jacked then
setControlState ( player, "enter_exit", false )
setTimer ( removePedFromVehicle, 750, 1, player )
setTimer ( setControlState, 150, 1, player, "enter_exit", false )
setTimer ( setControlState, 200, 1, player, "enter_exit", true )
setTimer ( setControlState, 700, 1, player, "enter_exit", false )
infobox ( player, "Du bist keiner\nvon "..fraktionNames[faction].."!", 4000, 255, 0, 0 )
end
end )
end
if faction == 1 then
addEventHandler ( "onVehicleEnter", veh,
function ( player, seat )
local veh = source
if not isKeyBound ( player, "sub_mission", "down", policeComputer ) then
bindKey ( player, "sub_mission", "down", policeComputer )
end
end )
elseif faction == 6 then
addEventHandler ( "onVehicleEnter", veh,
function ( player, seat )
local veh = source
if not isKeyBound ( player, "sub_mission", "down", policeComputer ) then
bindKey ( player, "sub_mission", "down", policeComputer )
end
end )
elseif faction == 8 then
addEventHandler ( "onVehicleEnter", veh,
function ( player, seat )
local veh = source
if getPedOccupiedVehicleSeat ( player ) == 0 then
if not isKeyBound ( player, "sub_mission", "down", policeComputer ) and getElementModel ( veh ) ~= 520 then
bindKey ( player, "sub_mission", "down", policeComputer )
end
if getElementModel ( veh ) == 433 then
setElementHealth ( player, 100 )
setPedArmor ( player, 100 )
setElementHunger ( player, 100 )
elseif getElementModel ( veh ) == 432 then
if vioGetElementData ( player, "job" ) ~= "tankcommander" then
opticExitVehicle ( player )
outputChatBox ( "Du hast nicht die erforderliche Klasse!", player, 125, 0, 0 )
end
elseif getElementModel ( veh ) == 425 or getElementModel ( veh ) == 520 then
if vioGetElementData ( player, "job" ) ~= "air" then
opticExitVehicle ( player )
outputChatBox ( "Du hast nicht die erforderliche Klasse!", player, 125, 0, 0 )
end
elseif getElementModel ( veh ) == 563 or getElementModel ( veh ) == 595 then
if vioGetElementData ( player, "job" ) ~= "marine" and seat == 0 then
opticExitVehicle ( player )
outputChatBox ( "Du hast nicht die erforderliche Klasse!", player, 125, 0, 0 )
else
giveWeapon ( player, 46, 3, true )
end
end
else
if not isKeyBound ( player, "sub_mission", "down", policeComputer ) and isOnDuty( player ) then
bindKey ( player, "sub_mission", "down", policeComputer )
end
if getElementModel ( veh ) == 433 then
setElementHealth ( player, 100 )
setPedArmor ( player, 100 )
setElementHunger ( player, 100 )
end
end
end )
end
--giveSportmotorUpgrade ( veh )
return veh
end
Alles anzeigen
Diesen Fehler hab ich erst seit heute und ich weiß nicht, wo der Fehler liegen könnte.
Fehlermeldung: https://gyazo.com/a788f9628fde3437f3b28d8c4fd62d2c
Es werden viele Fahrzeuge nicht gespawnt u. bei infos Steht Besitzer: "niemand"
Mit freundlichen Grüßen,
anacondaa