Jump to content

manawydan

Members
  • Posts

    980
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by manawydan

  1. you can use customblips resource to make custom blips: https://community.multitheftauto.com/in ... ils&id=960
  2. eai amigo acho que se voce falar um pouco sobre o servidor e postar imagens pode chamar mais atenção para o pessoal jogar!
  3. Boa sorte veio!
  4. Interessante cara, boa sorte!
  5. Obrigado, espero que eu possa contribuir mais!
  6. ai sim, bom trabalho!
  7. Eai pessoal blz? Então venho por meio desta compartilhar um pouco de conhecimento, fiz uma apresentação de slides sobre a lógica de programação para facilitar o conhecimento para qualquer um interessado, com exemplos fáceis e alguns exercicios. Você pode visualizar pelo site: http://pt.slideshare.net/Manawydan/logica-programar Criticas são bem vindas, e bom estudos para todos!
  8. realmente muito interessante cara, boa sorte!
  9. probar: local mesa1 = createObject(model,x,y,z) function clickMesa1(mouse,buttonState,element) if(element == mesa1)then outputChatBox("you clicked in mesa1",source) end end addEventHandler("onPlayerClick",root,clickMesa1)
  10. manawydan

    [WIP] LIFE

    nice man, good luck!
  11. sim so que o "O" é minusculo, voce pode usar funcoes de camera para fazer as custcenes,e usar o setPedControlState e setPedAnalogControlState, tambem pode usar para o aviao setElementVelocity para move-lo se preferir.
  12. voce pode usar a função: getDistanceBetweenPoints3D
  13. obrigado. mas o mod ainda nao ta completo, qualquer um pode modifica-lo como quiser
  14. Eai pessoal, a algum tempo estava criando um mod de "rpg medieval" para mta, só que não estou tão ativo no mta nos ultimos meses, então decidi deixar o mod para download, porém ele não esta terminado ainda, voces podem modificalo/edita-lo como quiserem, acredito que este mod podera ser util pra alguem. Download http://www.mediafire.com/download/79j1h7v5dzof8jh/RPG_mta.zip Imagens
  15. Bom tentei fazer um pouco mas não consigo passar dessa parte, alguem pode me ajudar?
  16. sim essa foi a unica maneira que consegui pensar, mas parece que vai dar uma gambiarra mesmo kk
  17. this?: function isInAnyFiveCuboid() local vehicles = getElementsByType("vehicle") for k,v in ipairs(vehicles)do if(isElementWithinColShape(v,cuboid[1]) or isElementWithinColShape(v,cuboid[2]) or isElementWithinColShape(v,cuboid[3]) or isElementWithinColShape(v,cuboid[4]) or isElementWithinColShape(v,cuboid[5])) then outputChatBox(getVehicleName(v).."is in cuboid") else outputChatBox(getVehicleName(v).."is out cuboid") end end end
  18. try, no tested jobmarkers = { {-2108.77734375, 144.54998779297, 35.134094238281}; {1642.7379150391, 2354.4382324219, 10.812967300415}; {2452.5341796875, -2119.5114746094, 13.546875}; } for i=1,#jobmarkers do local x,y,z = jobmarkers[i][1],jobmarkers[i][2],jobmarkers[i][3] marker = createMarker(x, y, z - 1, "cylinder", 1.5, 255, 255, 0, 150) blip = createBlipAttachedTo(marker, 51) addEventHandler("onMarkerHit", marker,hitMarker) end function hitMarker(thePlayer) triggerClientEvent(thePlayer, "onTruckerGuiOpen", thePlayer) end
  19. Eai pessoal, blz? Antigamente eu tinha visto um mod que permitia ter todas as armas (voce podia ter por exemplo pistola e depois trocava para silenciador e depois para desert eagle, parecendo que voce pode ter todas as armas) queria saber como fazer isso(ter as armas e ficar trocando elas normalmente como se não existisse a restrinção de uma arma por slot). Obrigado!
  20. manawydan

    Zday

    yes, you can use spawn points or the exported function: createZombie
  21. setPedControlState setPedAnalogControlState
  22. manawydan

    Help

    try this: local GhostRadar = createRadarArea ( -465.25684, 2173.76489, 130, 110, 255, 0, 0, 255 ) local GhostCol = createColCuboid ( -465.25684, 2173.76489, 40, 127, 100, 20 ) createBlip( -399.48187, 2233.17896, 42.42969, 23 ) addEvent ( "onBotWasted", true ) addEvent ( "onBotSpawned", true ) function onHit ( hitElement ) if getElementType ( hitElement ) == "player" then x,y,z = getElementPosition ( hitElement ) Timer = setTimer ( Spawn, 5*1000, 1) end if getElementType ( hitElement ) == "vehicle" then setElementHealth ( hitElement, 25 ) end end addEventHandler ( "onColShapeHit", GhostCol, onHit ) function Spawn () bot1 = exports["slothbot"]:spawnBot ( x + 5, y, z, 90, math.random ( 1, 100 ), 0, 0, nil, math.random ( 2, 9 ), "chasing" ) bot2 = exports["slothbot"]:spawnBot ( x, y + 5, z, 90, math.random ( 1, 100 ), 0, 0, nil, math.random ( 2, 9 ), "chasing" ) addEventHandler ( "onBotSpawned", bot1, Events ) addEventHandler ( "onBotSpawned", bot2, Events ) end function Events () if bot1 and bot2 then addEventHandler ( "onBotWasted", bot1, OnWasted ) addEventHandler ( "onBotWasted", bot2, OnWasted ) addEventHandler ( "onBotSpawned", bot1, OnSpawn ) addEventHandler ( "onBotSpawned", bot2, OnSpawn ) end end function OnWasted ( attacker, weapon, bodypart ) if attacker then if isElementWithinColShape ( attacker, GhostCol ) then if bodypart ~= 9 then givePlayerMoney ( attacker, 1000 ) end if bodypart == 9 then givePlayerMoney ( attacker, 2000 ) end end end end function OnSpawn () players = getElementsByType( "player", GhostCol ) setBotChase ( source, players ) end function onLeave ( leaveElement ) if Timer then killTimer ( Timer ) end end addEventHandler ( "onColShapeLeave", GhostCol, onLeave )
  23. manawydan

    Anti Spam

    one easy way: disable the chat for all players and enable with time local delayTime = (1*1000) -- one second local canChat = true function globalMessage(thePlayer, cmd, ...) if(canChat==false)return end canChat = false setTimer(ResetChatToOn,delayTime,1) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if cmd == "global" then if isPlayerMuted ( thePlayer ) then outputChatBox ("You are muted!", thePlayer, 255, 128, 22, true) return end end if isObjectInACLGroup("user." .. account, aclGetGroup("Owner")) then outputChatBox("GLOBAL - [#FF0000"..name.."#FA8258]: #FFFFFF"..message,root, 255, 255, 255, true) return else end local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("GLOBAL - [#0000FF"..name.."#FA8258]: #FFFFFF"..message,root, 255, 255, 255, true) return else end local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("GLOBAL - [#3ADF00"..name.."#FA8258]: #FFFFFF"..message,root, 255, 255, 255, true) return else end local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("GLOBAL - [#5F04B4"..name.."#FA8258]: #FFFFFF"..message,root, 255, 255, 255, true) return else end local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Supporter")) then outputChatBox("GLOBAL - [#2EFEF7"..name.."#FA8258]: #FFFFFF"..message,root, 255, 255, 255, true) return else outputChatBox("GLOBAL - [#FFFFFF"..name.."#FA8258]: #FFFFFF"..message,root, 255, 255, 255, true) return end end addCommandHandler("global", globalMessage) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"u", "down", "chatbox", "global") end end) addEventHandler("onPlayerJoin", root,function() bindKey(source, "u", "down", "chatbox", "global") end) function ResetChatToOn() canChat = true end
  24. cara voce pode usar a comunidade pra aprender, exemplo baixe algum mod e tente entender o que ele faz, nisso voce facilmente vai conseguir fazer seus mods do zero.
×
×
  • Create New...