Boaa galera!!! entao, eu tava fuçando aqui e nem tinha visto a resposta uahuahuah
Mas acabou q dei um jeito aqui... fiz uma gambiarra, tipo:
To usando OTHIRE e eh um server mto louco q eh 8.6 mas fizeram downgrade pra 7.72, entao tem muita função faltando e outras com nomes antigos...
Fiz o seguinte: Tem um script q cria storage pra dar uma bag automatica pro player q morreu, e fica declarado no login.lua
Peguei as funções getPlayerHealth, getPlayerMaxHealth e doPlayerAddHealth, e bolei um sisteminha pra verificar o healt:
--add a backpack if it is a relogin after a death
if getPlayerStorageValue(cid, STORAGE_DEATH_BAG) == 1 then
if getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).uid == 0 then
local item_bag = doCreateItemEx(ITEM_BAG, 1)
doPlayerAddItemEx(cid, item_bag, false, CONST_SLOT_BACKPACK)
-- Aqui termina o script da bag, aí eu adicionei abaixo essa verificação e coloquei --pra dar hp = maxhp
local vida = getPlayerHealth(cid)
local vidamax = getPlayerMaxHealth(cid)
if vida < 1 then
doPlayerAddHealth(cid, vidamax)
end
end
setPlayerStorageValue(cid, STORAGE_DEATH_BAG, -1)
end
espero q nao bugue outras partes kkk
mas obrigado ae galera pela ajuda!! se bugar eu tento o seu script wakon!