Jump to content

Search the Community

Showing results for tags 'sistema'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 6 results

  1. então queria ajuda para um sistema que quando a pessoa morrese ao inves de ir para o hp direto ficar deitado por um tempo se pudessem me ajudar agradeço
  2. To criando um sistema sono pro meu servidor Como eu nao entendo praticamente nada de scripting, estou indo por tutoriais e logica, até o momento criei uma linha de codigo onde vc dorme e teoricamente te congelaria e colocaria uma imagem na sua tela escrita, voce dormiu Peguei base de um sistema de fome Open que achei por ai. O timer ocorre o freeze funciona, creio que quando eu setar a animação tambem, porém a imagem nao tem outras coisas que queria adicionar como um /dormir em markers para recuperar sono completo. O countdown do sistema esta baixo para testes server.lua ---------------------------------------------------------------- connection = dbConnect('sqlite', 'dados.sqlite') dbExec(connection, 'CREATE TABLE IF NOT EXISTS fs (conta, sono)') outputDebugString("Script iniciado com sucesso!", 3) addEventHandler ( "onPlayerLogin", root, function ( _, acc ) setTimer ( Carregar_FS, 50, 1, acc ) end ) function Carregar_FS(conta) if not isGuestAccount(conta) then if conta then local result = dbPoll(dbQuery(connection, 'SELECT * FROM fs WHERE conta = ?', getAccountName(conta)), - 1) local player = getAccountPlayer(conta) if #result ~= 0 then local sono = result[1]['sono'] setElementData(player, "sono", tonumber(sono)) else setElementData(player, "sono", tonumber(100)) end end end end function Iniciar_FS_Resource(res) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then Carregar_FS(acc) end end end end addEventHandler("onResourceStart", getRootElement(), Iniciar_FS_Resource ) function Salvar_FS(conta) if conta then local sono = getElementData(source, "sono") or 100 local result = dbPoll(dbQuery(connection, 'SELECT * FROM fs WHERE conta = ?', getAccountName(conta)), - 1) if #result ~= 0 then dbExec(connection, 'UPDATE fs SET sono=? WHERE conta=?', sono, getAccountName(conta)) else dbExec(connection, 'INSERT INTO fs (conta, sono) VALUES(?, ?)', getAccountName(conta), sono) end end end function checksonoCount() for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then local sono = getElementData(player,"sono") or 0 setElementData(player, "sono", sono -1) if sono <= 10 then exports["n3xt_dxmessages"]:addBox(player, "Você precisa dormir.", "info") end if sono <= 0 then setElementData(player,"sono",1) setElementFrozen(player, true) triggerClientEvent(player, "exibirEfeitoVisual", resourceRoot, "SonoSystem/img/efeito.png") setPedAnimation(player, "BED", "BED_Loop_A", -1, true, false, false, false) setTimer(function() setElementFrozen(player, false) -- Descongela o jogador triggerClientEvent(player, "removerEfeitoVisual", resourceRoot) setPedAnimation(player, false) end, 100, 0) end end end end setTimer(checksonoCount,100,0) function Desligar_FS(res) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount (player) if not isGuestAccount(acc) then Salvar_FS(acc) end end end end addEventHandler("onResourceStop", getRootElement(), Desligar_FS) function Sair_Servidor(quitType) local acc = getPlayerAccount(source) if not isGuestAccount(acc) then if acc then Salvar_FS(acc) end end end addEventHandler("onPlayerQuit", getRootElement(), Sair_Servidor) --------------------------------- Fim --------------------- client.lua -------------------------------------------------- local screenWidth, screenHeight = guiGetScreenSize() local renderEventHandler function exibirEfeitoVisual(path) if not path then return end local textura = dxCreateTexture(path) if not textura then return end renderEventHandler = addEventHandler("onClientRender", root, function() local playerScreenW, playerScreenH = guiGetScreenSize() local imageW, imageH = 200, 200 local x = (playerScreenW - imageW) / 2 local y = (playerScreenH - imageH) / 2 dxDrawImage(x, y, imageW, imageH, textura) end) end addEvent("exibirEfeitoVisual", true) addEventHandler("exibirEfeitoVisual", resourceRoot, function(path) exibirEfeitoVisual("SonoSystem/img/" .. path) end) function removerEfeitoVisual() if renderEventHandler then removeEventHandler("onClientRender", root, renderEventHandler) renderEventHandler = nil end end addEvent("removerEfeitoVisual", true) addEventHandler("removerEfeitoVisual", resourceRoot, removerEfeitoVisual)
  3. Estava configurando um script de samu que ao cair o player inicia uma animação e pode ser curado pelo samu, porem ele pode abrir paineis como f1, f2, f3 e etc, queria saber como posso cancelar isso, quando ele cair bloquear ele de usar esses paineis. Por favor me ajudem. hpMin = 20 Tempo = {} ColMedic = {} function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function ChecarVida() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpMin then removePedFromVehicle(player) setElementData(player, "PlayerCaido", true) setElementFrozen(player, true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end else setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) end end end setTimer(ChecarVida, 200, 0) function ChecarVidaA() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 31 then setElementData(player, "PlayerCaido", false) setPedAnimation(player, false) setElementFrozen(player, false ) end end end end setTimer(ChecarVidaA, 200, 0) function SetarCaidoComHS() player = source if not getElementData(player, "PlayerCaido") then removePedFromVehicle(player) setElementHealth(player, 20) setElementData(player, "PlayerCaido", true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end addEvent("OnHS", true) addEventHandler("OnHS", getRootElement(), SetarCaidoComHS) function curar_jogador ( thePlayer, comando, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "CB") ) then local player_a_ser_curado = getPlayerFromPartialName ( nick ) local samux, samuy, samuz = getElementPosition ( thePlayer ) local curadox, curadoy, curadoz = getElementPosition ( player_a_ser_curado ) local dist = getDistanceBetweenPoints3D ( samux, samuy, samuz, curadox, curadoy, curadoz ) if player_a_ser_curado == thePlayer then outputChatBox("#bebebeVocê não pode se curar!",thePlayer,255,255,255,true) return end if ( dist > 3 ) then outputChatBox("#bebebeChegue mais perto do jogador!", thePlayer, 255, 255, 255, true) elseif ( dist < 3 )then setPedAnimation( thePlayer, "MEDIC", "CPR", 4500, true, false, false, false) setTimer ( function() setElementHealth ( player_a_ser_curado, 100 ) setPedAnimation(player_a_ser_curado, false) setElementFrozen( player_a_ser_curado, false ) setElementData(player_a_ser_curado,"PlayerCaido",false) end, 4500, 1 ) end end end end end addCommandHandler ( "curar", curar_jogador ) hpMin = 20 Tempo = {} ColMedic = {} function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function ChecarVida() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpMin then removePedFromVehicle(player) setElementData(player, "PlayerCaido", true) setElementFrozen(player, true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end else setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) end end end setTimer(ChecarVida, 200, 0) function ChecarVidaA() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 31 then setElementData(player, "PlayerCaido", false) setPedAnimation(player, false) setElementFrozen(player, false ) end end end end setTimer(ChecarVidaA, 200, 0) function SetarCaidoComHS() player = source if not getElementData(player, "PlayerCaido") then removePedFromVehicle(player) setElementHealth(player, 20) setElementData(player, "PlayerCaido", true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end addEvent("OnHS", true) addEventHandler("OnHS", getRootElement(), SetarCaidoComHS) function curar_jogador ( thePlayer, comando, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "CB") ) then local player_a_ser_curado = getPlayerFromPartialName ( nick ) local samux, samuy, samuz = getElementPosition ( thePlayer ) local curadox, curadoy, curadoz = getElementPosition ( player_a_ser_curado ) local dist = getDistanceBetweenPoints3D ( samux, samuy, samuz, curadox, curadoy, curadoz ) if player_a_ser_curado == thePlayer then outputChatBox("#bebebeVocê não pode se curar!",thePlayer,255,255,255,true) return end if ( dist > 3 ) then outputChatBox("#bebebeChegue mais perto do jogador!", thePlayer, 255, 255, 255, true) elseif ( dist < 3 )then setPedAnimation( thePlayer, "MEDIC", "CPR", 4500, true, false, false, false) setTimer ( function() setElementHealth ( player_a_ser_curado, 100 ) setPedAnimation(player_a_ser_curado, false) setElementFrozen( player_a_ser_curado, false ) setElementData(player_a_ser_curado,"PlayerCaido",false) end, 4500, 1 ) end end end end end addCommandHandler ( "curar", curar_jogador ) hpMin = 20 Tempo = {} ColMedic = {} function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function ChecarVida() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpMin then removePedFromVehicle(player) setElementData(player, "PlayerCaido", true) setElementFrozen(player, true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end else setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) end end end setTimer(ChecarVida, 200, 0) function ChecarVidaA() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 31 then setElementData(player, "PlayerCaido", false) setPedAnimation(player, false) setElementFrozen(player, false ) end end end end setTimer(ChecarVidaA, 200, 0) function SetarCaidoComHS() player = source if not getElementData(player, "PlayerCaido") then removePedFromVehicle(player) setElementHealth(player, 20) setElementData(player, "PlayerCaido", true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end addEvent("OnHS", true) addEventHandler("OnHS", getRootElement(), SetarCaidoComHS) function curar_jogador ( thePlayer, comando, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "CB") ) then local player_a_ser_curado = getPlayerFromPartialName ( nick ) local samux, samuy, samuz = getElementPosition ( thePlayer ) local curadox, curadoy, curadoz = getElementPosition ( player_a_ser_curado ) local dist = getDistanceBetweenPoints3D ( samux, samuy, samuz, curadox, curadoy, curadoz ) if player_a_ser_curado == thePlayer then outputChatBox("#bebebeVocê não pode se curar!",thePlayer,255,255,255,true) return end if ( dist > 3 ) then outputChatBox("#bebebeChegue mais perto do jogador!", thePlayer, 255, 255, 255, true) elseif ( dist < 3 )then setPedAnimation( thePlayer, "MEDIC", "CPR", 4500, true, false, false, false) setTimer ( function() setElementHealth ( player_a_ser_curado, 100 ) setPedAnimation(player_a_ser_curado, false) setElementFrozen( player_a_ser_curado, false ) setElementData(player_a_ser_curado,"PlayerCaido",false) end, 4500, 1 ) end end end end end addCommandHandler ( "curar", curar_jogador )
  4. Sistema de Clanes ? Incluye: ? Lista de clanes creados: Con diferenciación de color entre normal (blanco), oficial bit (azul), oficial premium(naranja). ? Sistema de Invitaciones ? Informacion del clan ? Banco del Clan: Con sistema de compra de plan oficial (bit y premium). ? Reclutacion de miembros ? Lista de miembros, con opción para kickear, dar/quitar sublider, dar/quitar recluter y dar rango personalizado ? Administración de clanes, como eliminación, cambio de color del clan, tag del clan. ? Historial, donde se guardan todos los movimientos realizados por usuarios miembros del clan. ? El Sistema de Clanes Oficiales viene incluido, mas sin embargo es solo un identificador. Ya el cliente decidirá que beneficios dar a cada clan. ? Todos los datos se guardan en base de datos propia en el código, nada de guardar en bases de datos del servidor. ? Interfaces Multi-pantallas ? 10,00$ PayPal. Negociable. Comisión incluida. Imágenes: Forma de contacto, por mi pagina de facebook, o mensaje privado a este perfil
  5. function getPlayerFromID(id) return call(getResourceFromName("game_id2"), "getPlayerFromID", tonumber(id)) end function getPlayerID(player) return getElementData(player,"id") end function criarGang ( source, commandName, ... ) local getaMoney = getPlayerMoney (source) local teamName = table.concat({...}, " ") if teamName then if getaMoney <300000 then outputChatBox("#7d26cd[SERVER] #FF0000Você não tem dinheiro suficiente para criar uma gang valor 5000$",source,255,255,255,true) else if ( getPlayerTeam(source) ~= false ) and ( countPlayersInTeam(getPlayerTeam(source)) == 1 ) then destroyElement(getPlayerTeam(source)) outputChatBox("#F4A460[SERVER]#F08080 Sua gang antiga foi deletada e foi criada uma nova!",source,255,255,255,true) end local newTeam = createTeam ( teamName) if newTeam then takePlayerMoney (source,300 ) local getGang = getTeamName ( newTeam ) setTeamColor (newTeam,math.random(0,255), math.random(0,255), math.random(0,255)) setPlayerTeam ( source, newTeam ) local playerTeam = getPlayerTeam( source ) outputChatBox("#43CD80[GANG] #FFFFFFGang criada com sucesso!",source, 255, 255, 255, true) end end else outputChatBox("#43CD80[GANG] #FFFFFFUso correto: /gangcriar [nome]",source,255,255,255,true) end end addCommandHandler("gangcriar",criarGang) addEventHandler("onPlayerLogin",root,function() local team = getAccountData (getPlayerAccount(source), "team") if (team==getTeamName(getTeamFromName(team))) then setPlayerTeam(source, getTeamFromName(team)) end end) function save() local team = getPlayerTeam(source) local account = getPlayerAccount(source) if not isGuestAccount(account) then if(team)then setAccountData(account, "team", getTeamName(team)) end end end addEventHandler("onPlayerLogout", root, save) addEventHandler("onPlayerQuit", root, save) function sairDaGang(source) local playerTeam = getPlayerTeam (source) if (playerTeam) then setPlayerTeam (source, nil) outputChatBox("#43CD80[GANG] #FFFFFFVocê saiu da gang",source,255,255,255,true) else outputChatBox("#43CD80[GANG] #ffffffVocê não tem gang",source,255,255,255,true) end end addCommandHandler("gangsair", sairDaGang) function desfazerGang (source) local playerVeri = getPlayerTeam (source) if (playerVeri) then destroyElement (playerVeri) outputChatBox("#43CD80[GANG] #FFFFFFVocê deletou sua gang",source,255,255,255,true) else outputChatBox("#43CD80[GANG] #FFFFFFVocê não tem gang",source,255,255,255,true) end end addCommandHandler("gangdeletar", desfazerGang) function enviarGang(source,cmd,targetPlayer) local target = getPlayerFromID (targetPlayer) local geta = getPlayerFromID (target) gang = getPlayerTeam (source) local getName = getTeamFromName(source) lala = getTeamName(source) local convidado = true setElementData(target, "gangConvite", gang, false) if gang == getName then outputChatBox("#43CD80[GANG] #FFFFFFVocê não pertence a nenhuma gang",source, 255, 255, 255, true) else outputChatBox("#43CD80[GANG] #FFFFFFConvite de recrutamento enviado para o Jogador " ..getPlayerName(target).. " ID: "..targetPlayer,source, 255, 255, 255, true) outputChatBox("#43CD80[GANG] #FFFFFFVocê foi convidado para a gang #43CD80" ..getTeamName(gang).. " #FFFFFFuse #43CD80/gangaceitar #FFFFFFpara entrar na Gang: #ffffff "..getTeamName(gang),target, 255, 255, 255, true) end end addCommandHandler("gangconvidar", enviarGang) function Recrutamento(source) local gangConvite = getElementData(source, "gangConvite") if isElement(gangConvite) then outputChatBox("#43CD80[GANG] #FFFFFFVocê entrou na gang "..getTeamName(gang),source, 255, 255, 255, true) setPlayerTeam (source, gangConvite) else outputChatBox("#43CD80[GANG] #FFFFFFVocê não foi convidado para nenhuma gang",source, 255, 255, 255, true) end end addCommandHandler("gangaceitar",Recrutamento) function gangCommands(thePlayer) outputChatBox ( "#7d26cd[GANG] #ffffffUse /gangcriar | /gangcor CODE RGB | /gangtag | /gangconvidar ID/Nome | /gangabandonar | /gangsair | /gangdeletar", thePlayer, 255, 255, 255, true ) end addCommandHandler ( "gang", gangCommands ) function gangName ( player, commandName, newName ) local theTeam = getPlayerTeam ( player ) setTeamName ( theTeam, newName ) outputChatBox("A Gangue "..getTeamName(theTeam).." alterou o nome ["..newName.."]", root, 255, 0, 0) end addCommandHandler("gangnome", gangName ) function gangFarbe ( player, commandName, r, g, b ) local team = getPlayerTeam ( player ) setTeamColor ( team, r, g, b ) outputChatBox("[INFO] A gangue "..getTeamName(team).." alterou a cor da Gangue", source, 255, 255, 255, tonumber(r), tonumber(g), tonumber(b)) end addCommandHandler("gangcor", gangFarbe ) addCommandHandler( "gangtag", function ( source, cmdname, tag ) if tag and ( tag:len() > 3 or tag:len() == 0 ) then return outputChatBox("A tag deve ter no máximo 3 caracteres.", source, 230, 0, 0) end if getPlayerTeam(source) and tag then setPlayerName(source, "["..tag.."]"..getPlayerName(source)) elseif not tag then outputChatBox("Sintaxe: /gangtag <tag da gangue>", source, 230, 0, 0) end end ) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end Este script apenas funciona o /gangcriar "aparece o nome da gang no scoreboard", /gangnome "muda o nome antigo da gang", /gangdeletar e também da pra fazer /gangcriar "com a gang criada ele apaga a antiga e muda nome" mas não funciona tag, não da pra convidar ninguém para gang, só funciona os comandos os quais eu citei agora! Obrigado a quem conseguir me ajudar desde já! Lembrando só que eu uso um sistema de tags para por exemplo dono, sub dono... etc... E meu chat não utiliza ID, apenas nome...
  6. Como es esto? tengo estas funciones la primera es la función de que si te rompes los huesos no puedes correr ni saltar... La segunda es la función de que si tieens sueño no puedes correr pero SI saltar... Cúal es el problema? pues es que cuando te rompes los huesos puedes correr pero no saltar.... La verdad no se que pasa es como si estuvieran mezcladas las funciones (mal colocadas nosé). function checkBrokenbone() if getElementData(getLocalPlayer(), "logedin") then if getElementData(getLocalPlayer(), "brokenbone") or getElementData(localPlayer,"sleep") <= 0 then if not isPedDucked(getLocalPlayer()) then end toggleControl("jump", false) toggleControl("sprint", false) else toggleControl("jump", true) toggleControl("sprint", true) end end end setTimer(checkBrokenbone, 1400, 0) --------------------------------------------------- --sleep function checkSleeping() if getElementData(getLocalPlayer(),"logedin") then if getElementData(getLocalPlayer(),"sleep") <= 20 then if not isPedDucked(getLocalPlayer()) then end toggleControl ( "sprint", false ) else toggleControl ( "sprint", true ) end end end setTimer(checkSleeping,1400,0) Se supone que la idéa sería que si me rompo los huesos no pueda correr ni saltar y cuando tenga sueño no pueda correr pero SI saltar.... Cúal es la solución chicos?????
×
×
  • Create New...