Jump to content

Adissonboy11

Members
  • Posts

    45
  • Joined

  • Last visited

Details

  • Gang
    ExT

Recent Profile Visitors

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

Adissonboy11's Achievements

Rat

Rat (9/54)

0

Reputation

  1. 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?
  2. 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
  3. Thank you man, but my files are luac. My problem is other...
  4. 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...
  5. 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
  6. 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
  7. Up. My intention is not to cause flood, but receive help. : c
  8. 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
  9. Estou só esperando você entrar em contato comigo, para a gente botar em pratica tudo aquilo que conversamos via skype...
  10. I need urgent. Can anyone help me with some kind of tutorial or a slothbot already have this configured function?
  11. I need them to be smarter, shoot in the head, and shoot fast.
  12. 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.
  13. Thanks Mr.unpredictable and Walid , got it.
  14. 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.
×
×
  • Create New...