Adissonboy11
Members-
Posts
45 -
Joined
-
Last visited
Everything posted by Adissonboy11
-
The http will be a folder referring to the "mods/deathmatch/resources" of the server, but online? Do not I need to declare what he needs to download?
-
I understand how the feature you wrote works. But I'm behind a method where I can not connect to the server to do file transfer. I want the files to be transferred by directlink, or ftp for example. A link to a site outside of the MTA. Sorry my bad eng. Type this, how does it work? How do I store the resources? I have these doubts
-
Thank you man, but my files are luac. My problem is other...
-
I need do what the players does download this resources the server for one link private, with for exemple http://www.dropbox.com/directlink... Exemple: Instead of the resources being downloaded directly from the host, the players open the resources through the external link. This would reduce a transfer of machine data when playing What do? I need help...
-
I have one ladder-system, however Animation not running. I need help, you can help me solve? dff = engineLoadDFF ( "ladder.dff", 1428 ) engineReplaceModel ( dff, 1428 ) inladder = false setElementFrozen ( localPlayer, false) --setPedAnimation ( localPlayer ) ladder_id = 0 current_ladder = nil inladder_down = false going_up = false ladder_x, ladder_y, ladder_z = 0,0,0 ladder_rz = 0 child_ladder = nil launch_available = false function updateCamera () if inladder and launch_available then local state = getControlState ( "forwards" ) local state_back = getControlState ( "backwards" ) if state and not going_down then setElementCollisionsEnabled ( localPlayer, false ) local x,y,z = getElementPosition ( localPlayer ) setElementPosition ( localPlayer, ladder_x, ladder_y,z+0.1) setPedAnimation( localPlayer,"PED","FightShfF",-1,true,false,true) local rx,ry,rz = getElementRotation ( localPlayer ) setElementRotation ( localPlayer, rx,ry, ladder_rz) going_up = true return true elseif state_back then local x,y,z = getElementPosition ( localPlayer ) local z_ground = getGroundPosition ( x,y,z ) if z-z_ground >= 2 then setElementCollisionsEnabled ( localPlayer, false ) --setElementCollidableWith ( localPlayer, current_ladder, false ) local pos = setElementPosition ( localPlayer, ladder_x, ladder_y,z-0.1) setPedAnimation( localPlayer,"PED","FightShfF",-1,true,false,true) local rx,ry,rz = getElementRotation ( localPlayer ) setElementRotation ( localPlayer, rx,ry, ladder_rz) wasClimbing = true return true else inladder = false going_down = false going_up = false current_ladder = nil ladder_id = 0 child_ladder = nil setElementCollisionsEnabled ( localPlayer, true ) end end setElementCollisionsEnabled ( localPlayer, true ) end end addEventHandler ( "onClientRender", root, updateCamera ) function onClientColShapeHit( theElement, matchingDimension ) --outputChatBox ( "enter: "..tostring (getElementData ( source, "ladder_id"))) if ( theElement == getLocalPlayer() ) then if getElementData ( source, "ladder") then inladder = true ladder_id = getElementData ( source, "ladder_id" ) or 0 current_ladder = source local posX, posY, posZ = getElementPosition ( source ) local rotation = getElementData ( source, "ladder_rz") posX = posX + math.sin(math.rad(rotation)) * 0.2 posY = posY - math.cos(math.rad(rotation)) * 0.2 ladder_x, ladder_y = posX, posY ladder_z = posZ going_down = false ladder_rz = -getElementData ( source, "ladder_rz") elseif getElementData ( source, "ladder_down") and ent_avail then local parent = getElementData ( source, "ladder_parent" ) setElementCollidableWith ( localPlayer, parent, false ) if not going_up then going_down = true inladder = true ladder_id = getElementData ( source, "ladder_id" ) or 0 current_ladder = parent local posX, posY, posZ = getElementPosition ( parent ) local rotation = getElementData ( parent, "ladder_rz ") posX = posX - math.sin(math.rad(rotation)) * 0.2 posY = posY + math.cos(math.rad(rotation)) * 0.2 ladder_x, ladder_y = posX, posY ladder_z = posZ child_ladder = source ladder_rz = -getElementData ( parent, "ladder_rz ") end end end end addEventHandler("onClientColShapeHit",getRootElement(),onClientColShapeHit) function onClientColShapeLeave (theElement) if ( theElement == getLocalPlayer() and getElementData ( source, "ladder") and inladder ) then local x,y,z = getElementPosition ( localPlayer ) setTimer ( checkStillInLadder, 200, 1, ladder_id,z-1.5) going_down = false --elseif theElement == getLocalPlayer() and getElementData ( source, "ladder_down" )and inladder and not isElementWithinColShape (localPlayer, current_ladder ) end end addEventHandler("onClientColShapeLeave",getRootElement(),onClientColShapeLeave) function checkStillInLadder ( lad_id, posZ ) if lad_id == ladder_id and not isElementWithinColShape (localPlayer, current_ladder ) then inladder = false going_down = false going_up = false child_ladder = nil setElementCollisionsEnabled ( localPlayer, true ) if ladder_z < posZ then setElementFrozen ( localPlayer, true ) triggerServerEvent ("playFinishClimbing", localPlayer) ent_avail = false setTimer ( function () ent_avail = true end, 3000, 1) end end end
-
The rotation of the bone-attach is not very good with Carl Jhonson, any solution? The object does not follow the rotation of the animations. My code: attach_func.lua: http://pastebin.com/zT1e5Mad bone_attach.lua: http://pastebin.com/hQkPbVne bone_attach_c.lua: http://pastebin.com/uqWVAhRL bone_pos_rot: http://pastebin.com/vfStmNtV
-
[Help] show window and guiCreateCheckBox (Not solved)
Adissonboy11 replied to Adissonboy11's topic in Scripting
Thanks -
Up. My intention is not to cause flood, but receive help. : c
-
I got an error and doubt. The window does not open, and I need that when the box is checked, the chatbox disappear. Help-me local checkbox = {} local window = {} local button = {} local label = {} panel.window[1] = guiCreateWindow(31, 179, 251, 307, "15", false) guiWindowSetMovable(panel.window[1], false) guiWindowSetSizable(panel.window[1], false) guiSetAlpha(panel.window[1], 0.78) panel.checkbox[1] = guiCreateCheckBox(96, 70, 15, 15, "", false, false, panel.window[1]) panel.label[1] = guiCreateLabel(120, 68, 78, 19, "CHATBOX", false, panel.window[1]) function showpanel(key,keyState) if getElementData(getLocalPlayer(),"logedin") then if ( keyState == "down" ) then guiSetVisible(panel.window[1],not guiGetVisible(panel.window[1])) showCursor(not isCursorShowing()) if guiGetVisible(panel.window[1]) == true then onClientOpenpanelStopMenu () else hidepanel () end end end end bindKey ( "o", "down", showpanel ) function showpanelManual () guiSetVisible(panel.window[1],not guiGetVisible(panel.window[1])) showCursor(not isCursorShowing()) refreshInventory() if guiGetVisible(panel.window[1]) == true then onClientOpenpanelStopMenu () end end function hidepanelManual () guiSetVisible(panel.window[1],false) showCursor(false) hidepanel () end addEvent("hidepanelManual",true) addEventHandler("hidepanelManual",getLocalPlayer(),hidepanelManual) function onClientOpenpanelStopMenu () triggerEvent("disableMenu",getLocalPlayer()) end function hidepanel () guiSetVisible(rightclickWindow,false) end
-
Dead Walkers: código liberado
Adissonboy11 replied to Stanley Sathler's topic in Portuguese / Português
Estou só esperando você entrar em contato comigo, para a gente botar em pratica tudo aquilo que conversamos via skype... -
I need urgent. Can anyone help me with some kind of tutorial or a slothbot already have this configured function?
-
I need them to be smarter, shoot in the head, and shoot fast.
-
I need my bots are more hardcore, please. Any solution? Client-side function banditGetDamageDayZ ( attacker, weapon, bodypart, loss ) cancelEvent() if attacker and attacker == getLocalPlayer() and getElementData(source,"trorist") then damage = 100 if weapon == 37 then return end if weapon == 63 or weapon == 51 or weapon == 19 then setElementData(source,"blood",0) if getElementData(source,"blood") <= 0 then triggerServerEvent("onBanditGetsKilled",source,attacker) end elseif weapon and weapon > 0 and attacker and getElementType(attacker) == "player" then damage = getWeaponDamage(weapon) if bodypart == 9 then damage = damage*4 headshot = true end setElementData(source,"blood",getElementData(source,"blood")-math.random(damage*0.75,damage*1.25)) if getElementData(source,"blood") <= 0 then triggerServerEvent("onBanditGetsKilled",source,attacker,headshot) end end end if attacker and getElementData(attacker,"trorist") and getElementData(source,"zombie") then damage = getElementData(attacker,"damage") setElementData(source,"blood",getElementData(source,"blood")-math.random(damage*0.75,damage*1.25)) if getElementData(source,"blood") <= 0 then triggerServerEvent("onZombieGetsKilled",source,attacker,headshot) end end end addEventHandler ( "onClientPedDamage", getRootElement(), banditGetDamageDayZ ) function playerGetDamageDayZFromBandit ( attacker, weapon, bodypart, loss ) cancelEvent() damage = 100 headshot = false if isElement(attacker) and getElementData(attacker,"trorist") then damage = getElementData(attacker,"damage") setElementData(getLocalPlayer(),"blood",getElementData(getLocalPlayer(),"blood")-damage) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer (), playerGetDamageDayZFromBandit ) function checkBandit1() local x,y,z = getElementPosition(getLocalPlayer()) for i,ped in ipairs(getElementsByType("ped")) do if getElementData(ped,"trorist") then local sound = getElementData(getLocalPlayer(),"volume")/5 local visibly = getElementData(getLocalPlayer(),"visibly")/5 local xZ,yZ,zZ = getElementPosition(ped) if getElementData(ped,"type") == "sniper" then if getDistanceBetweenPoints3D (x,y,z,xZ,yZ,zZ) < sound+visibly-300 then else triggerServerEvent("banditStopFollow",getLocalPlayer(),ped) end else if getDistanceBetweenPoints3D (x,y,z,xZ,yZ,zZ) < sound+visibly then else triggerServerEvent("banditStopFollow",getLocalPlayer(),ped) end end end end end setTimer(checkBandit1,5000,0) server.lua createTeam("Бандиты") local stats = { [ 69 ] = 999, [ 70 ] = 999, [ 71 ] = 999, [ 72 ] = 999, [ 73 ] = 999, [ 74 ] = 999, [ 75 ] = 999, [ 76 ] = 999, [ 77 ] = 999, [ 78 ] = 999, [ 79 ] = 999, [ 160 ] = 999, [ 229 ] = 999, [ 230 ] = 999 } function applyStats(player) for stat,value in pairs(stats) do setPedStat(player, stat, value) end end function getTypeConfig(bottype) for i,v in ipairs(typeSettings) do if bottype == v[1] then local skin,weapon,damage,health = v[3],v[2],v[4],v[5] return skin,weapon,damage,health end end end function createBots() for i,value in ipairs(pedCords) do local x,y,z,bottype = value[1],value[2],value[3],value[4] local skin,weapon,damage,health = getTypeConfig(bottype) ped = call (getResourceFromName("slothbot"),"spawnBot",x,y,z,math.random(0,360),skin,0,0,getTeamFromName("Бандиты"),weapon) call ( getResourceFromName ( "slothbot" ), "setBotGuard", ped, x,y,z, false) applyStats(ped) setElementData(ped,"spawn",{x,y,z}) setElementData(ped,"trorist",true) setElementData(ped,"type",bottype) setElementData(ped,"damage",damage) setElementData(ped,"blood",health) end end createBots() function removeBots() for i,value in ipairs(getElementsByType("ped")) do local bandit = getElementData(value,"trorist") if bandit then destroyElement(value) end end end addEventHandler("onResourceStop",getRootElement(getThisResource()),removeBots) function banditStopFollow(ped) local spawn = getElementData(ped,"spawn") local x,y,z = spawn[1],spawn[2],spawn[3] call ( getResourceFromName ( "slothbot" ), "setBotGuard", ped, x, y, z, false) end addEvent("banditStopFollow",true) addEventHandler("banditStopFollow",getRootElement(),banditStopFollow) function removeDeadBanditAndRespawn(ped,pedCol,spawn,bottype) setTimer(respawnBandit,pedRespawnTime,1,spawn,bottype) destroyElement(ped) destroyElement(pedCol) end function respawnBandit(spawn,bottype) local x,y,z = spawn[1],spawn[2],spawn[3] local skin,weapon,damage,health = getTypeConfig(bottype) ped = call (getResourceFromName("slothbot"),"spawnBot",x,y,z,math.random(0,360),skin,0,0,getTeamFromName("Бандиты"),weapon) call ( getResourceFromName ( "slothbot" ), "setBotGuard", ped, x,y,z, false) applyStats(ped) setElementData(ped,"spawn",{x,y,z}) setElementData(ped,"trorist",true) setElementData(ped,"type",bottype) setElementData(ped,"damage",damage) setElementData(ped,"blood",health) end function banditKilled (killer,headshot) --outputChatBox("Server: destroyed zombie (reason: zombie died)") local skin = getElementModel(source) local x,y,z = getElementPosition(source) local ped = createPed(skin,x,y,z) local pedCol = createColSphere(x,y,z,1.5) local spawnpoint = getElementData(source,"spawn") local bottype = getElementData(source,"type") killPed(ped) setTimer(removeDeadBanditAndRespawn,pedRemoveBody,1,ped,pedCol,spawnpoint,bottype) attachElements (pedCol,ped,0,0,0) setElementData(pedCol,"parent",ped) setElementData(pedCol,"playername","Бандит") setElementData(pedCol,"deadman",true) setElementData(ped,"deadbandit",true) setElementData(pedCol,"deadman",true) local time = getRealTime() local hours = time.hour local minutes = time.minute setElementData(pedCol,"deadreason","Похоже он мёртв. Время смерти: "..hours..":"..minutes..".") for i, item in ipairs(itemTableBandits) do local value = math.percentChance (item[5]/2.5,1) setElementData(pedCol,item[1],value) end destroyElement(source) if headshot == true then setElementData(killer,"headshots",getElementData(killer,"headshots")+1) end end addEvent("onBanditGetsKilled",true) addEventHandler("onBanditGetsKilled",getRootElement(),banditKilled) function math.percentChance (percent,repeatTime) local hits = 0 for i = 1, repeatTime do local number = math.random(0,200)/2 if number <= percent then hits = hits+1 end end return hits end config.lua pedRemoveBody = 50000 -- Время после которого труп бандита ищезнит pedRespawnTime = 50000 -- Время после токго как труп ищезнет до того как он заспавниться pedCords = { {-1938.6,2398.2,50,"guard"}, {-1922.7,-1930.8,50,"guard"}, {-1930.8,2390,50,"guard"}, {-1927.2,2381.3999,50,"guard"}, } ----Типы ботов --guard Бот охранник носит с собой М4 Урон 4500крови typeSettings = { --{Тип,Оружие,Скин,Урон,Кровь} {"guard",31,287,4500,12000}, } itemTableBandits = { {"Спички",328,0.4,90,5}, {"Assault Pack (ACU)",3026,0.5,0,6}, {"Револьвер",348,1,90,0.3}, {"MP5A5",353,1,90,0.1}, {"Часы",2710,1,0,3}, {"Карта",1277,0.8,90,4}, {"GPS",2976,0.15,0,1}, {"Банка макарон",2770,0.1,0,5}, {"Банка бобов",2601,1,0,5}, {"Рация",2966,0.5,0,3}, {"Бейсбольная бита",336,1,90,0.5}, } My GameMode is DayZ.
-
Thanks Mr.unpredictable and Walid , got it.
-
[Ajuda] SetSoundVolume [resolvido]
Adissonboy11 replied to Adissonboy11's topic in Programação em Lua
Obrigado galera, desculpe pelo transtorno mas tinha uma linha errada no meu código, não estava igual ao do #RooTs, agora funcionou, desculpas por minha falta de atenção. Obrigado pela ajuda pessoal, obrigado mesmo. -
Thanks ALw7sH, Thanks Mr.unpredictable..
-
Thanks
-
Friends , I need this hud high, only appears when I'm in aircraft and helicopters , no cars and motorcycles . If you do not understand , I want this text to appear when I get into some helicopter , type : My code: addEventHandler ( "onClientRender", getRootElement(), function() if isPedInVehicle(getLocalPlayer()) and isSpeedoEnabled == true then local x,y,z = getElementPosition (getLocalPlayer()) dxDrawText("ALT:", 707+2, 8+2, 773+2, 42+2, tocolor(0, 0, 0), 0.70, "bankgothic", "left", "top", false, false, true) dxDrawText("ALT:", 707, 8, 773, 42, tocolor(67, 150, 39), 0.70, "bankgothic", "left", "top", false, false, true) dxDrawText("" ..tostring(math.floor (z)).. "m",777+2, 10+2, 866+2, 42+2, tocolor(0, 0, 0), 0.70, "bankgothic", "left", "top", false, false, true) dxDrawText("" ..tostring(math.floor (z)).. "m",777, 10, 866, 42, tocolor(67, 150, 39), 0.70, "bankgothic", "left", "top", false, false, true) dxDrawImage(773+1, 4+1, 68+1, 34+1,"imgs/speeds.png", 0,0,0, tocolor(0, 0, 0)) dxDrawImage(773, 4, 68, 34,"imgs/speeds.png", 0,0,0, tocolor(67, 150, 39)) end end) function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return math.floor((x^2 + y^2 + z^2) ^ 0.5 * 100) else return math.floor((x^2 + y^2 + z^2) ^ 0.5 * 100 * 1.609344) end else return false end end
-
Friends , I need that when a player passes over the object, it explodes. Any idea? function onPlayerBuildAMiNe (itemName) setElementData(source,itemName,getElementData(source,itemName)-1) setPedAnimation (source,"BOMBER","BOM_Plant",-1, false, false, false, false) local source = source setTimer( function () local x,y,z = getElementPosition(source) local xr,yr,zr = getElementRotation(source) px, py, pz = getElementPosition(source) prot = getPedRotation(source) local offsetRot = math.rad(prot+90) local vx = px + 1 * math.cos(offsetRot) local vy = py + 1 * math.sin(offsetRot) local vz = pz + 2 local vrot = prot+90 -- tent = createObject(849,vx,vy,pz-0.75,xr,yr,vrot) tent = createObject(1225,vx,vy,pz-1.4,xr,yr,vrot) setObjectScale(tent,1) tentCol = createColSphere(x,y,z,2) attachElements ( tentCol, tent, 0, 0, 0 ) setElementData(tentCol,"parent",tent) setElementData(tent,"parent",tentCol) setElementData(tentCol,"mine",true) triggerClientEvent(source,"refreshInventoryManual",source) end,1500,1) end addEvent("onPlayerBuildAMiNe",true) addEventHandler("onPlayerBuildAMiNe",getRootElement(),onPlayerBuildAMiNe) function removeMine (object) local x,y,z = getElementPosition(getElementData(object,"parent")) local item,itemString = getItemTablePosition("Land Mine (Anti-Tank)") local itemPickup = createItemPickup(item,x,y,z+2,itemString) destroyElement(getElementData(object,"parent")) destroyElement(object) end addEvent("removeMine",true) addEventHandler("removeMine",getRootElement(),removeMine)
-
[Ajuda] SetSoundVolume [resolvido]
Adissonboy11 replied to Adissonboy11's topic in Programação em Lua
function playGunfireSound() local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition ( source ) local px, py, pz = getElementPosition ( source ) local weapon = getPedWeapon ( source ) local current_1 = getElementData(source,"currentweapon_1") local current_2 = getElementData(source,"currentweapon_2") if not weapon then return end if weapon == 25 and current_1 == "Winchester 1866" then local sound = playSound3D("soundweapons/Winchester .wav", muzzleX, muzzleY, muzzleZ, true) setSoundMaxDistance(sound, 185) setSoundMinDistance(sound, 1) setSoundVolume(sound, 100) end end addEventHandler("onClientPlayerWeaponFire",getRootElement(),playGunfireSound) --------------------------------------------------------------------------------->> -
Dead Walkers: código liberado
Adissonboy11 replied to Stanley Sathler's topic in Portuguese / Português
StanleySathler, Gostei muito da sua ideia, gostaria de ajuda-lo como for, tenho bastante contatos de pessoas que tem servidores de DayZ, eu acho que poderia te ajudar com divulgação de pagina, e do GameMode em sí, gostaria de conversar melhor com você sobre isto. Edit* Tenho umas ideias em mente que nunca vi em nenhum servidor, acho que séria bem foda construir uma comunidade/site onde divulga-se conteúdo relacionado á essa sua versão da DayZ. -
[Ajuda] SetSoundVolume [resolvido]
Adissonboy11 replied to Adissonboy11's topic in Programação em Lua
O código que o Roots mandou, funciona, porem o som não para, fica repetindo várias vezes conforme atira, fica repetindo eternamente... Não para, e o Codigo do Stanley, não funcionou. :c -
I have to do what? Please give me a friend for example. you need an object id to fix all your warnings example replace model with 3886. Can you give me an example?
-
Galera, está acorrendo este erro O som toca, mas esses Warnnigs me incomoda, alguém tem alguma solução? function playGunfireSound() local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition ( source ) local px, py, pz = getElementPosition ( source ) local weapon = getPedWeapon ( source ) local current_1 = getElementData(source,"currentweapon_1") local current_2 = getElementData(source,"currentweapon_2") if not weapon then return end if weapon == 27 and current_1 == "Saiga 12k" then local sound = setSoundMaxDistance(playSound3D("soundweapons/sa58v.mp3",muzzleX, muzzleY, muzzleZ),150) setSoundVolume(sound, 3) elseif weapon == 25 and current_1 == "Winchester 1866" then local sound = setSoundMaxDistance(playSound3D("soundweapons/winchester.wav",muzzleX, muzzleY, muzzleZ),150) setSoundVolume(sound, 3) end end
-
[Ajuda] Time e valores [resolvido]
Adissonboy11 replied to Adissonboy11's topic in Programação em Lua
Beleza, essa parte está ok, agora preciso ver como vou fazer esse check para quando estiver false parar de perder blood, tem alguma exemplo feito?