Jump to content

[Ajuda] Comando e msg apenas para Adms e Skill armas


Recommended Posts

Pessoal, eu tenho este cmd:

function tele (thePlayer)
    setElementPosition ( thePlayer, -1339, 52, 15 )
    outputChatBox ('#000000║#ffffff✘ #FFD700Teleport#ffffff ✘#000000║: #FFFFff' .. getPlayerName(thePlayer) .. ' #ffffffFoi Para O Aeroporto De SF #000000║#FFD700 /Sf #000000║', root, 255, 255, 255, true)
end
addCommandHandler ( "sf", tele )

 

Como faço para fazê-lo com q apenas adms da acl possam executá-lo, bem como a msg "foi para tal lugar" ser vista apenas pelo adm q executou o cmd? Vlw!

 

--------------------------------------------------

Pessoal, já no caso da img abaixo, qual função faz com q o player pegue na arma como se já tivesse todasas skills, ao invés de segurar a arma como mostra a print? Vlw!

http://imgur.com/rStpxVx

Edited by luiz gabriel
Link to comment
  • Moderators

Tente:


function tele (thePlayer)
     if isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( "Admin" ) ) then
		setElementPosition ( thePlayer, -1339, 52, 15 )
		outputChatBox ('#000000║#ffffff✘ #FFD700Teleport#ffffff ✘#000000║: #ffffffVocê Foi Para O Aeroporto De SF #000000║#FFD700 /Sf #000000║', thePlayer, 255, 255, 255, true)
	end
end
addCommandHandler ( "sf", tele )

Sobre a segunda pergunta, use setPedStat. Dá uma olhada na página da Wiki, Ex: setPedStat( player, 77, 1000 ).

Edited by DNL291
Link to comment
  • Other Languages Moderators
10 hours ago, luiz gabriel said:

Como faço para fazê-lo com q apenas adms da acl possam executá-lo

Leia isso: IsObjectInACLGroup

10 hours ago, luiz gabriel said:

como a msg "foi para tal lugar" ser vista apenas pelo adm q executou o cmd?

Você deveria ler mais a Wiki, começando por isso: OutputChatBox
Ao colocar Root, vc deixou a mensagem global pois é o elemento parente de todos os outros elementos.
Para entender os elementos, dê uma olhada aqui: Element_tree (só olhando aquela imagem já da pra entender bastante)

Já a segunda pergunta, já foi respondida resumidamente, boa sorte.

Edited by Lord Henry
Link to comment
4 hours ago, DNL291 said:

Tente:


function tele (thePlayer)
     if isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( "Admin" ) ) then
		setElementPosition ( thePlayer, -1339, 52, 15 )
		outputChatBox ('#000000║#ffffff✘ #FFD700Teleport#ffffff ✘#000000║: #ffffffVocê Foi Para O Aeroporto De SF #000000║#FFD700 /Sf #000000║', thePlayer, 255, 255, 255, true)
	end
end
addCommandHandler ( "sf", tele )

Sobre a segunda pergunta, use setPedStat. Dá uma olhada na página da Wiki, Ex: setPedStat( player, 77, 1000 ).

 

4 hours ago, Lord Henry said:

Leia isso: IsObjectInACLGroup

Você deveria ler mais a Wiki, começando por isso: OutputChatBox
Ao colocar Root, vc deixou a mensagem global pois é o elemento parente de todos os outros elementos.
Para entender os elementos, dê uma olhada aqui: Element_tree (só olhando aquela imagem já da pra entender bastante)

Já a segunda pergunta, já foi respondida resumidamente, boa sorte.

 

Vlw, pessoal!

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