LVx,LVy,LVz = 1607.1999511719 ,1823.5 ,10.800000190735
LSx,LSy,LSz = 1178.5999755859 ,-1323.5999755859 ,14.10000038147
SFx,SFy,SFz = -2653.8000488281 ,629.79998779297, 14.5
function timerTOT ()
x,y,z = getElementPosition( source )
LV = getDistanceBetweenPoints3D ( x, y, z, LVx, LVy, LVz )
LS = getDistanceBetweenPoints3D ( x, y, z, LSx, LSy, LSz )
SF = getDistanceBetweenPoints3D ( x, y, z, SFx, SFy, SFz )
outputChatBox ("Sie sind tot...", source, 255, 0, 0, false)
setTimer ( function(source)
fadeCamera (source, false)
end, 3000, 1, source )
setTimer ( function(source)
if LV < LS and LV < SF then
setCameraTarget (source)
spawnPlayer (source, LVx,LVy,LVz, 1, 0, 0 ,0)
setElementHealth ( source, 100)
fadeCamera (source, true)
outputChatBox ("Die Ärzte Haben dich wieder zusammengeflickt", source, 255, 0, 0, false)
elseif SF < LS and SF < LV then
setCameraTarget (source)
spawnPlayer (source, SFx,SFy,SFz, 1, 0, 0 ,0)
setElementHealth ( source, 100)
fadeCamera (source, true)
outputChatBox ("Die Ärzte Haben dich wieder zusammengeflickt", source, 255, 0, 0, false)
elseif LS < LV and LS < SF then
setCameraTarget (source)
spawnPlayer (source, LSx,LSy,LSz, 1, 0, 0 ,0)
setElementHealth ( source, 100)
fadeCamera (source, true)
outputChatBox ("Die Ärzte Haben dich wieder zusammengeflickt", source, 255, 0, 0, false)
end
end, 10000, 1, source )
end
addEventHandler( "onPlayerWasted", getRootElement( ),timerTOT)
Alles anzeigen
Sollte so gehen.
Kann es leider jetzt nicht austesten.