Jump to content

[AJUDAR] Qual o erro nisso ?


Recommended Posts

Existe um script onde o player consegue atirar dentro do veículo desde que ele esteja em determinado veículo e ACL. Porém quando pego uma arma que no GTA:SA comum não é possível atirar de dentro do carro como por exemplo uma M4 eu consigo atirar, mas a arma não aparece em minha mão. Segue código e print abaixo para melhor explicação:

IDs = { [426]=true} 

function Atirarmar ( jog, seat, jacked )
    if ( IDs[getElementModel(source)] ) then 
    local conta = getAccountName(getPlayerAccount(jog))
         if (  
isObjectInACLGroup("user." .. conta, aclGetGroup("Recruta Marinha BR"))) then 
    bindKey (jog,"mouse2","down",bindatirocarro)
       else
          end
    end
end
addCommandHandler ("atira",Atirarmar)
addEventHandler ( "onVehicleEnter", getRootElement(), Atirarmar )


function desbindaarma (jog)
 if (IDs[getElementModel(source)] ) then
 unbindKey (jog,"mouse2","down",bindatirocarro)   
       end
end
addEventHandler ( "onVehicleExit", getRootElement(), desbindaarma)


function bindatirocarro (jog)

    if (not isPedDoingGangDriveby (jog)) then
    setPedDoingGangDriveby (jog, true )
    elseif (isPedDoingGangDriveby (jog)) then
    setPedDoingGangDriveby (jog,false) 
    end
end    

https://i.imgur.com/5hDRnw0.png

Desde já agradeço!

Link to comment
  • Moderators

Bloqueie a arma para driveby, até onde eu sei esse problema é do GTA e certas armas (como a M4) não mostram.

Embora seja possível recriar a arma na mão com script, não vale a pena tentar se você não tem conhecimento suficiente.

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