Jump to content

Problema com Scirpt


Recommended Posts

Estou tendo problema na parte do scirpt mandar a menssagem para o jogador, eu ainda to aprendendo mais não fasso a minima ideia de como arrumar isso no momento tambem não sei se tem alguma forma de arrumar isso

  Quote
if Selecionado == "Agua" then
					    if Agua_01 > 0 then
						    local Sede_Atual = getElementData ( localPlayer, "AirNewSCR_Sede" )
					        if Sede_Atual == 100 then
								exports.tenorio_info:showBoxS(localPlayer, " Você não está com Sede!", "error")
						    else
					            setElementData ( localPlayer, "AirNewSCR_Sede", Sede_Atual + 15 )
								setElementData ( localPlayer, "AirNewSCR_Inventario_Agua", Agua_01 - 1 )
						    end
						else
							exports.tenorio_info:showBoxS(localPlayer, " Você não Possui Agua no Inventario!", "error")
						end

 

Expand  

Imagem do erro: https://prnt.sc/s23z7n

OBS: E um sistema de Fome e Sede, ai quando eu clico pra tenta beber água ou mesmo não tendo água, ele da aquele erro ao inves de manda a msg em dx

Link to comment
if Selecionado == "Agua" then
					    if Agua_01 > 0 then
						    local Sede_Atual = getElementData ( localPlayer, "AirNewSCR_Sede" ) or 0
					        if Sede_Atual == 100 then
								exports.tenorio_info:showBoxS(localPlayer, " Você não está com Sede!", "error")
						    else
					            setElementData ( localPlayer, "AirNewSCR_Sede", Sede_Atual + 15 )
								setElementData ( localPlayer, "AirNewSCR_Inventario_Agua", Agua_01 - 1 )
						    end
						else
							exports.tenorio_info:showBoxS(localPlayer, " Você não Possui Agua no Inventario!", "error")
						end

Tente assim

Link to comment
  On 20/04/2020 at 14:15, MesaDowN said:

if Selecionado == "Agua" then
					    if Agua_01 > 0 then
						    local Sede_Atual = getElementData ( localPlayer, "AirNewSCR_Sede" ) or 0
					        if Sede_Atual == 100 then
								exports.tenorio_info:showBoxS(localPlayer, " Você não está com Sede!", "error")
						    else
					            setElementData ( localPlayer, "AirNewSCR_Sede", Sede_Atual + 15 )
								setElementData ( localPlayer, "AirNewSCR_Inventario_Agua", Agua_01 - 1 )
						    end
						else
							exports.tenorio_info:showBoxS(localPlayer, " Você não Possui Agua no Inventario!", "error")
						end

Tente assim

Expand  

Ainda esta dando mesmo erro

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...