Jump to content

DUVIDA EM COMANDOS POR ID


Recommended Posts

Posted
function SairPrisao (playerSource,commandName,id)
if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("Prisão")) then
    if(id) then
        local playerID = tonumber(id)
		if(playerID) then
			setElementPosition(playerSource, 1552.603, -1675.62, 16.195)
			setElementDimension(playerSource, 0)
			setElementInterior(playerSource, 0)
			exports.Scripts_OnMarkerMsgs_:delete2 ( )
			setElementData ( playerSource, "AirNew_PagouFianca", "Sim" )
			setElementData ( playerSource, "AirNew_Tempo_Prisao", tonumber(0) )
			setElementData ( playerSource, "AirNew_Preso", "Não" )
			end
		end
	end
end
addCommandHandler("c", SairPrisao)

Então, Meu plano é liberar uma pessoa da prisão por id.

exemplo: o id 56 ta preso e quero dar o comando /c 56 e ele sair da prisão.

esta funcionando mais não do jeito que eu quero, eu dou /c e qualquer id e libera somente eu.

 

e se eu der /c em qualquer momento estando preso ou não eu sou teleportado para a posição destinada ali, e não quero isso.

quem puder ajudar agradeço.

 

SISTEMA QUE ESTOU USANDO: https://www.mtabrasil.com.br/2019/11/sistema-de-prisaoprender-f9.html

 

So My plan is to release a person from prison by id.

example: id 56 is in jail and I want to give the command /c 56 and he gets out of prison.

it's working but not the way I want, I give /c and any id and release only me.

and if I hit /c at any time whether I'm stuck or not I'm teleported to the destined position there, and I don't want that.

who can help thank you.

SYSTEM I'M USING: https://www.mtabrasil.com.br/2019/11/sistema-de-prisaoprender-f9.html

Posted

Primeiramente, cole o código com a formatação Lua, para destacar o código com a devida linguagem.
Quanto ao seu código:

  • Recomendo que deixe seu código com indentação correta, vai ajudar a deixar seu código mais legível
  • Verifique se o jogador-alvo está preso numa condição if
  • Você vai precisar de uma forma de puxar o jogador por meio do ID especificado

Please do not PM me with scripting related question nor support, use the forums instead.

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...