local spawnV =
{
{ 255.52216, 255.324234, 0 },
{ 255.52216, 255.324234, 0 },
{ 255.52216, 255.324234, 0 }
}
local spawnL =
{
{ 1922.7138671875, -2300.3759765625, 13.546875 },
{ 2708.5712890625, -1740, 42.133285522461 },
{ 1140, -1474.28515625, 15.796875 }
}
local spawnF =
{
{ 255.52216, 255.324234, 0 },
{ 255.52216, 255.324234, 0 },
{ 255.52216, 255.324234, 0 }
}
addEventHandler( "onPlayerWasted", getRootElement(),
function()
local x, y, z = getElementPosition ( source )
local city = getZoneName ( x, y, z, true )
if city == "Las Venturas" then
setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnV[ math.random ( #spawnV ) ] ) )
fadeCamera (source, true)
setCameraTarget (source, source)
elseif city == "San Fierro" then
setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnF[ math.random ( #spawnF ) ] ) )
fadeCamera (source, true)
setCameraTarget (source, source)
elseif city == "Los Santos" then
setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnL[ math.random ( #spawnL ) ] ) )
fadeCamera (source, true)
setCameraTarget (source, source)
else
setTimer( spawnPlayer, 2000, 1, source, unpack ( spawnL[ math.random ( #spawnL ) ] ) )
fadeCamera (source, true)
setCameraTarget (source, source)
end
end
)
ahora si funciona