Hallo Leute!
Habe mal zum test einen Script gemacht der eigentlich alle Patrioten der Army(GodMother) respawnen sollte:
Lua
aPatriot1 = createVehicle ( 470, 191.63499450684, 1920.5762939453, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot1, 86, 44, 0, 0 )
setElementHealth( aPatriot1, 5000 )
setVehiclePaintjob ( aPatriot1, 3 )
toggleVehicleRespawn ( aPatriot1, true )
setVehicleRespawnDelay ( aPatriot1, 60000)
setVehicleIdleRespawnDelay ( aPatriot1, 60000)
setElementData(aPatriot1,"faccarid", 4)
aPatriot2 = createVehicle ( 470, 194.98461914063, 1920.5625, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot2, 86, 44, 0, 0 )
setElementHealth( aPatriot2, 5000 )
setVehiclePaintjob ( aPatriot2, 3 )
toggleVehicleRespawn ( aPatriot2, true )
setVehicleRespawnDelay ( aPatriot2, 60000)
setVehicleIdleRespawnDelay ( aPatriot2, 60000)
setElementData(aPatriot2,"faccarid", 4)
aPatriot3 = createVehicle ( 470, 200.7841796875, 1920.5390625, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot3, 86, 44, 0, 0 )
setElementHealth( aPatriot3, 5000 )
setVehiclePaintjob ( aPatriot3, 3 )
toggleVehicleRespawn ( aPatriot3, true )
setVehicleRespawnDelay ( aPatriot3, 60000)
setVehicleIdleRespawnDelay ( aPatriot3, 60000)
setElementData(aPatriot3,"faccarid", 4)
aPatriot4 = createVehicle ( 470, 204.05902099609, 1920.5502929688, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot4, 86, 44, 0, 0 )
setElementHealth( aPatriot4, 5000 )
setVehiclePaintjob ( aPatriot4, 3 )
toggleVehicleRespawn ( aPatriot4, true )
setVehicleRespawnDelay ( aPatriot4, 60000)
setVehicleIdleRespawnDelay ( aPatriot4, 60000)
setElementData(aPatriot4,"faccarid", 4)
aPatriot5 = createVehicle ( 470, 209.55865478516, 1920.5285644531, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot5, 86, 44, 0, 0 )
setElementHealth( aPatriot5, 5000 )
setVehiclePaintjob ( aPatriot5, 3 )
toggleVehicleRespawn ( aPatriot5, true )
setVehicleRespawnDelay ( aPatriot5, 60000)
setVehicleIdleRespawnDelay ( aPatriot5, 60000)
setElementData(aPatriot5,"faccarid", 4)
aPatriot6 = createVehicle ( 470, 213.05874633789, 1920.5399169922, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot6, 86, 44, 0, 0 )
setElementHealth( aPatriot6, 5000 )
setVehiclePaintjob ( aPatriot6, 3 )
toggleVehicleRespawn ( aPatriot6, true )
setVehicleRespawnDelay ( aPatriot6, 60000)
setVehicleIdleRespawnDelay ( aPatriot6, 60000)
setElementData(aPatriot6,"faccarid", 4)
aPatriot7 = createVehicle ( 470, 218.6335144043, 1920.5169677734, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot7, 86, 44, 0, 0 )
setElementHealth( aPatriot7, 5000 )
setVehiclePaintjob ( aPatriot7, 3 )
toggleVehicleRespawn ( aPatriot7, true )
setVehicleRespawnDelay ( aPatriot7, 60000)
setVehicleIdleRespawnDelay ( aPatriot7, 60000)
setElementData(aPatriot7,"faccarid", 4)
aPatriot8 = createVehicle ( 470, 222.18280029297, 1920.5026855469, 17.750637054443, 0, 0, 0, "Army" )
setVehicleColor ( aPatriot8, 86, 44, 0, 0 )
setElementHealth( aPatriot8, 5000 )
setVehiclePaintjob ( aPatriot8, 3 )
toggleVehicleRespawn ( aPatriot8, true )
setVehicleRespawnDelay ( aPatriot8, 60000)
setVehicleIdleRespawnDelay ( aPatriot8, 60000)
setElementData(aPatriot8,"faccarid", 4)
function RespawnArmy (player)
if (getElementData(player,"Fraktion") == 4) then
if (getElementData(player,"Rank") == 5) then
respawnVehicle (aPatriot1)
respawnVehicle (aPatriot2)
respawnVehicle (aPatriot3)
respawnVehicle (aPatriot4)
respawnVehicle (aPatriot5)
respawnVehicle (aPatriot6)
respawnVehicle (aPatriot7)
respawnVehicle (aPatriot8)
end
end
end
addCommandHandler ( "re", RespawnArmy )
Alles anzeigen
Aber es respawnen immer nur 1 und 2 die anderen 6 nich O.o was mach ich falsch?
Gruß,
Steilo