Apaguei e refiz continua o mesmo error '-'
local hospitalpos = {
[1] = {x = 1021, y = 981, z = 7}, -- posições pra onde o player será teleportado ao morrer
[2] = {x = 1026, y = 981, z = 7},
[3] = {x = 1030, y = 981, z = 7},
local str 66666
function onDeath(cid, position)
registerCreatureEvent(cid, "DeathPlayerHospital_L")
if isPlayer(cid) then
setPlayerStorageValue(cid, str, 1)
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "DeathPlayerHospital")
if isPlayer(cid) then
if getPlayerStorageValue(cid, str) == 1 then
setPlayerStorageValue(cid, str, -1)
doTeleportThing(cid, hospitalpos[math.random(#hospitalpos)], true)
end
end
return true
end