Imortallity Posted January 20, 2019 Share Posted January 20, 2019 function blockJoin(player) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("SAMU")) then if getPedOccupiedVehicle(player) then setElementPosition(getPedOccupiedVehicle(player), 1983.74536, -1465.94702, 13.39063) end setElementPosition(player, 1983.74536, -1465.94702, 13.39063) exports.dxmessages:outputDx(player, "Você não pode entrar aqui!", "error") end end addEventHandler("onColShapeHit", rBlock, blockJoin) Há algum erro nestas linhas? no debugscript 3 está dando "expected element at argument 1, got nil" para o GetAccountName e "Expected Account at argument 1, got bolean", ajudem por favor galera, agradeço desde já! Link to comment
Jonas^ Posted January 20, 2019 Share Posted January 20, 2019 (edited) function blockJoin (thePlayer) local acc = getPlayerAccount (thePlayer) if not isObjectInACLGroup ( "user." ..getAccountName(acc), aclGetGroup ("SAMU")) then if getPedOccupiedVehicle(thePlayer) then setElementPosition(getPedOccupiedVehicle(thePlayer), 1983.74536, -1465.94702, 13.39063) end setElementPosition(thePlayer, 1983.74536, -1465.94702, 13.39063) exports.dxmessages:outputDx(thePlayer, "Você não pode entrar aqui!", "error") end end addEventHandler("onColShapeHit", rBlock, blockJoin) Edited January 20, 2019 by OverKILL 1 Link to comment
miiguelz Posted January 21, 2019 Share Posted January 21, 2019 1 hour ago, Imortallity said: function blockJoin(player) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("SAMU")) then if getPedOccupiedVehicle(player) then setElementPosition(getPedOccupiedVehicle(player), 1983.74536, -1465.94702, 13.39063) end setElementPosition(player, 1983.74536, -1465.94702, 13.39063) exports.dxmessages:outputDx(player, "Você não pode entrar aqui!", "error") end end addEventHandler("onColShapeHit", rBlock, blockJoin) Há algum erro nestas linhas? no debugscript 3 está dando "expected element at argument 1, got nil" para o GetAccountName e "Expected Account at argument 1, got bolean", ajudem por favor galera, agradeço desde já! Você não definiu o getAccountName, ou seja, não definiu seu parâmetro. ~ O exemplo do @OverKILL deve servir. 1 Link to comment
Imortallity Posted January 21, 2019 Author Share Posted January 21, 2019 Sim, o exemplo dele serviu, muito obrigado a ambos pela ajuda! Link to comment
miiguelz Posted January 21, 2019 Share Posted January 21, 2019 De nada, qualquer dúvida, pode perguntar. 1 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