victortp Posted June 22, 2013 Share Posted June 22, 2013 Olá galera, estou com problema com o reload do meu servidor.. Até achei um script na internet, porém não funciona. Alguém teria esse script pra me ajudar? Link to comment
manawydan Posted June 22, 2013 Share Posted June 22, 2013 voce quer o resource que quando voce aperta "R" sua arma recarrega? Link to comment
DNL291 Posted June 22, 2013 Share Posted June 22, 2013 Todos os recursos do MTA podem ser encontrados aqui: https://code.google.com/p/mtasa-resources/downloads/list Se você continuar tendo erros, o problema não é com o recurso. Link to comment
LucasBaker Posted July 10, 2013 Share Posted July 10, 2013 Olá galera, estou com problema com o reload do meu servidor.. Até achei um script na internet, porém não funciona. Alguém teria esse script pra me ajudar? Server: function forceReload(p) reloadPedWeapon (p) end addCommandHandler("Reload weapon",forceReload) function bindPlayerReloadKey(p) bindKey(p,"r","down","Reload weapon") end function bindReloadForAllPlayers() for k,v in ipairs(getElementsByType("player")) do bindPlayerReloadKey(v) end end --addEventHandler("onResourceStart",getResourceRootElement(),bindReloadForAllPlayers) -- Enable when issue 4532 is fixed --Please remove the following when issue 4532 is fixt: addEvent("onPlayerReload",true) addEventHandler("onPlayerReload",getRootElement(), function() reloadPedWeapon (source) end ) Client: addCommandHandler("Reload weapon", function() local task = getPedSimplestTask(localPlayer) if ((task == "TASK_SIMPLE_JUMP" or task == "TASK_SIMPLE_IN_AIR") and not doesPedHaveJetPack(localPlayer)) then return end triggerServerEvent("onPlayerReload", localPlayer) end ) bindKey("r","down","Reload weapon") 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