Augusto

Script de se curar

Recommended Posts

Preciso de ajuda, to aprendendo agr a criar scripts, e sem a função consultar o marker aparece e o outputChatBox funciona certinho, mas quando coloco a função consultar o marker nao aparece EDIT: Pode deixar, ja consegui, usei o debugscript 3 e percebi que faltava um "then", so to falando isso pq nn sei excluir

consulta.Lua



hpMarker = createMarker(1188.3895263672,-1323.0168457031,12.566656112671, "cylinder", 2.0, 0, 255, 255)


function msg(player)
    outputChatBox("Digite /consultar para saber seu estado medico", player, 0, 255, 255, true)
end

addEventHandler("onMarkerHit", hpMarker, msg)


function consultar(player)
    if isElementWithinMarker(player, hpMarker)
    vida = getElementHealth(player)
    outputChatBox("Sua vida: "..vida.. ", Digite /curar para fazer um tratamento", player, 0, 255, 255, true)
    end
    end

    addCommandHandler("consultar", consultar)
meta


<meta>
<script src="consulta.Lua" type="server"/>
</meta>

 

Edited by Augusto

Share this post


Link to post

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.