Jump to content

FelipeMallmann

Members
  • Posts

    168
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

FelipeMallmann's Achievements

Busta

Busta (15/54)

0

Reputation

  1. Before trying to get x,y,z from the target, you must check if the target exists and if it is a player function teleport(thePlayer,cmd,target) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if (target) then local targetPlayer = getPlayerFromName(target) if (targetPlayer) then x,y,z = getElementPosition (targetPlayer) setElementPosition (thePlayer, x,y,z) else outputChatBox("this target is not a player") end else outputChatBox("target needed", thePlayer) end else outputChatBox("you are not adm", thePlayer) end end addCommandHandler( "tp", teleport)
  2. Tem erro nessa linha local Check = getPedClothes(ped, i) --Checará se o o trousers do player, para poder setar no ped(calça) pois a variável i nao existe até então coloque ela dentro do for if skin == 0 then for i = 0,17 do local Check = getPedClothes(ped, i) addPedClothes(source,Check) end Quando voce morre, vai ser criado um novo ped (para ser seu corpo morto no chao) local ped = createPed(0,x,y,z,rotZ) Esse corpo, vai ter a skin do cj, sem nenhuma roupa. O seu código está pegando as roupas do ped e setando no player, voce deve fazer ao contrario. Usar o getPedClothes para pegar as roupas do player (source) e fazer o addPedClothes no corpo (ped) E tambem o getPedClothes, retorna duas strings, entao voce nao pode por apenas uma variavel, mesma coisa com o addPedClothes, voce tem que passar a textura e o modelo. local skin = getElementModel(source) if skin == 0 then for i=0, 17, 1 do local textura, modelo = getPedClothes(source, i) if (textura ~= false) then addPedClothes(ped, textura, modelo, i) end end end
  3. try this function targetingActivated (target) if (target) then if getElementType(target) == "player" then outputChatBox(getElementType(target),255,255,255) setPlayerNametagShowing (target, false) prevTarget = target end else if (prevTarget) then outputChatBox("Heil Hitler!",0,255,0) setPlayerNametagShowing (prevTarget, true) else outputChatBox("There is no target / previous target.") end end end but this may show player nick only if you aim again and have no target. is that what you want?
  4. Hello Guys, I've got some questions do make. OVH Hosting is one of the most used by mta server developers and I'm also using that. But my server gets ddos attack every day, it does not end connection but lags a lot and I dont understand why some servers hosted at OVH dont get affected by attacks and my server does. I use anti ddos game from OVH, is that the best option to use? Thanks.
  5. Guys, is there a way to reducing max udp connections per ip in mta settings? My server is getting ddosed every day. I know mtaserver.cfg can limit http connections, but they may be attacking game port 22003 and not 22005. Any way, I'm already using a host with great system of mistigation to avoid attcks, but it's not enough. Someone knows what could I do to block/reduce the ddos atacks? Thanks.
  6. Entao o source nao ta mais sendo o veiculo, veja se isso funciona function respawn() outputChatBox("|Sua caranga velha já era!|", sourcePlayer) local carro = source setTimer(function (carro) outputChatBox("CARRO: " ..getVehicleName(carro)) outputChatBox("|Seu veiculo foi transferido para o sucatão, para retira-lo pague 350R$!|", sourcePlayer) respawnVehicle ( carro ) setElementHealth (carro , getElementHealth (carro )-700) setElementPosition ( carro , -708.98931884766,950.66259765625,11.769227981567) setVehicleLocked ( carro , true ) --setVehicleDamageProof(vehicle, true) end, 5000, 1) end addEventHandler("onVehicleExplode", getRootElement(), respawn)
  7. é erro no source, por algum motivo nao ta pegando o carro faz um teste outputChatBox("CARRO: " ..getVehicleName(source)) Vê se aparece o nome do carro quando ele explode, e ve se aparece o nome do carro depois que o timer é executado. function respawn() outputChatBox("|Sua caranga velha já era!|", sourcePlayer) outputChatBox("CARRO: " ..getVehicleName(source)) setTimer(function () outputChatBox("CARRO: " ..getVehicleName(source)) outputChatBox("|Seu veiculo foi transferido para o sucatão, para retira-lo pague 350R$!|", sourcePlayer) respawnVehicle ( source ) setElementHealth (source , getElementHealth (source )-700) setElementPosition ( source , -708.98931884766,950.66259765625,11.769227981567) setVehicleLocked ( source , true ) --setVehicleDamageProof(vehicle, true) end, 5000, 1) end addEventHandler("onVehicleExplode", getRootElement(), respawn)
  8. Quando um veiculo explodir, voce esta pegando todos os veiculos e respawnando um a um com o for ... local vehicles = getElementsByType ( "vehicle" ) for k, vehicle in ipairs ( vehicles ) do respawnVehicle ( vehicle ) ... end use source para pegar apenas o carro explodido ao inves de vehicle e apague as linhas 5,6 e 12
  9. Se seus amigos conseguem e voce nao, provavelmente nao é por causa do defaultstats. Uma vez aconteceu isso comigo e eu percebi que o fps influencia nisso. Nao use o fps limite do seu servidor no maximo, coloque uns 70-80.
  10. You can use a global variable to do that. presidentExist = false addCommandHandler("president", function(player) if (presidentExist == false) then presidentExist = true local randomPlayer = getRandomPlayer() local veh = createVehicle(409, 1481.3916015625, -1733.9626464844, 13.3828125) local president = getTeamFromName("President") setPlayerTeam(randomPlayer, getTeamFromName("President")) outputChatBox("#fff000(Mission) #8e8c00Seek help from the #0000ffPolice #8e8c00and reach your target destination", player, 255, 255, 255, true) spawnPlayer(player, 1481.3916015625, -1733.9626464844, 13.3828125) warpPedIntoVehicle(player, veh) fadeCamera(player, true) setCameraTarget(player, player) setPlayerNametagColor(player, 255, 255, 0) setElementModel(player, 17) else outputChatBox("Error: there is already a president selected", player, 255, 0, 0) end end ) And when president dies you set presidentExist to false
  11. https://wiki.multitheftauto.com/wiki/GetElementSpeed https://wiki.multitheftauto.com/wiki/OutputChatBox
  12. Eu nao tenho certeza se o source da funçao do setTimer vai ser o mesmo source da funçao em que ele está, mas tente ver se funciona function respawnExplodedVehicle() setTimer(respawnVehicle, 5000, 1, source) local driver = getVehicleOccupant(source) setTimer ( function() setElementHealth (source, getElementHealth (source)-700) setElementPosition ( source, -708.98931884766,950.66259765625,11.769227981567) if (driver) then outputChatBox ( "|Seu carro foi transferido para o sucatão!|", driver) end setVehicleLocked ( source, true ) end, 6000, 1 ) end addEventHandler("onVehicleExplode", getRootElement(), respawnExplodedVehicle)
  13. Voce nao tem que fazer getPlayerMoney na variavel money_suborno, use somente local money_suborno = tonumber(amount) Ou entao nem use uma variavel para guardar a quantia que ele digitar, use sempre o amount. Mostre como está seu codigo agora, pois no ultimo que voce mandou nao tem nada retirando dinheiro do player.
×
×
  • Create New...