Fabi Posted January 17, 2020 Share Posted January 17, 2020 (edited) Preciso que alguém me ajude a colocar permissão nesse script EXEMPLO: if isObjectInACLGroup ("user."..accName, aclGetGroup ( "vip") ) then function fix (playerSource) local theVehicle = getPedOccupiedVehicle (playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then fixVehicle (theVehicle) outputChatBox ("" , thePlayer) end end addCommandHandler ("fix" , fix) Edited January 17, 2020 by Fabi Link to comment
Renaz Posted January 17, 2020 Share Posted January 17, 2020 (edited) Não foi postado no sitio mais correto possivel , poste aqui (é a secção portuguesa do mta) https://forum.multitheftauto.com/forum/127-programação-em-Lua/ Edited January 17, 2020 by Renazz edit Link to comment
Angelo Pereira Posted January 19, 2020 Share Posted January 19, 2020 Adicione embaixo da função : local accName = getAccountName(getPlayerAccount(playerSource)) --/> PEGAR CONTA DO JOGADOR if isObjectInACLGroup ("user."..accName, aclGetGroup ( "vip") ) then --/> VERIFICAR SE O LOGIN ESTA NA ACL vip e adicione um end no final da função. Ficará assim : function fix (playerSource) local accName = getAccountName(getPlayerAccount(playerSource)) --/> AQUI if isObjectInACLGroup ("user."..accName, aclGetGroup ( "vip") ) then --/> AQUI local theVehicle = getPedOccupiedVehicle (playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then fixVehicle (theVehicle) outputChatBox("", playerSource, 255,255,255,true) end end --/> AQUI end addCommandHandler ("fix" , fix) Link to comment
Jonas^ Posted January 19, 2020 Share Posted January 19, 2020 addCommandHandler ("fix", function (thePlayer, cmd) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ("vip")) then local theVehicle = getPedOccupiedVehicle (thePlayer) if (theVehicle and getVehicleController (theVehicle) == thePlayer) then fixVehicle (theVehicle) outputChatBox ("|VIP| Você reparou seu veículo com sucesso!", thePlayer, 0, 255, 0) end end end) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now