Jump to content

[Help]Survivor system


shoBy

Recommended Posts

Guys...A little big problem..

Debugscript 3:

survivor.png

surv.png

survivorsSystem_client.lua:

--[[ 
#---------------------------------------------------------------#
----*           DayZ MTA Script survivorSystem_client.lua           *----
----* Esse Script foi Modificado por Maikao da mtaZ.wikiforum.net
----* Criadores: Mawrin -L- -ffs-sniper
----* Skype: Pergunta no Posto ipiranga
----*                                                       *----
#---------------------------------------------------------------#
]]
addEventHandler("onClientResourceStart", getResourceRootElement(), function()
  dayzVersion = "DayZ 0.7b mtaZ.wikiforum.net"
  versionLabel = guiCreateLabel(1, 1, 0.3, 0.3, dayzVersion, true)
  guiSetSize(versionLabel, guiLabelGetTextExtent(versionLabel), guiLabelGetFontHeight(versionLabel), false)
  x, y = guiGetSize(versionLabel, true)
  guiSetPosition(versionLabel, 1 - x, 1 - y * 1.8, true)
  guiSetAlpha(versionLabel, 0.5)
end)
snipertxd = engineLoadTXD("mods/sniper.txd")
engineImportTXD(snipertxd, 285)
sniperdff = engineLoadDFF("mods/sniper.dff", 285)
engineReplaceModel(sniperdff, 285)
snipertxd = engineLoadTXD("mods/female.txd")
engineImportTXD(snipertxd, 191)
sniperdff = engineLoadDFF("mods/female.dff", 191)
engineReplaceModel(sniperdff, 191)
snipertxd = engineLoadTXD("mods/ghillie_suit_woman.txd")
engineImportTXD(snipertxd, 94)
sniperdff = engineLoadDFF("mods/ghillie_suit_woman.dff", 94)
engineReplaceModel(sniperdff, 94)
snipertxd = engineLoadTXD("mods/civ_girl.txd")
engineImportTXD(snipertxd, 93)
sniperdff = engineLoadDFF("mods/civ_girl.dff", 93)
engineReplaceModel(sniperdff, 93)
snipertxd = engineLoadTXD("mods/civilian.txd")
engineImportTXD(snipertxd, 179)
sniperdff = engineLoadDFF("mods/civilian.dff", 179)
engineReplaceModel(sniperdff, 179)
snipertxd = engineLoadTXD("mods/bandit3.txd")
engineImportTXD(snipertxd, 180)
sniperdff = engineLoadDFF("mods/bandit3.dff", 180)
engineReplaceModel(sniperdff, 180)
snipertxd = engineLoadTXD("mods/bandit2.txd")
engineImportTXD(snipertxd, 288)
sniperdff = engineLoadDFF("mods/bandit2.dff", 288)
engineReplaceModel(sniperdff, 288)
snipertxd = engineLoadTXD("mods/standart.txd")
engineImportTXD(snipertxd, 73)
sniperdff = engineLoadDFF("mods/standart.dff", 73)
engineReplaceModel(sniperdff, 73)
snipertxd = engineLoadTXD("mods/femalestandard.txd")
engineImportTXD(snipertxd, 191)
sniperdff = engineLoadDFF("mods/femalestandard.dff", 191)
engineReplaceModel(sniperdff, 191)
snipertxd = engineLoadTXD("mods/hero.txd")
engineImportTXD(snipertxd, 210)
sniperdff = engineLoadDFF("mods/hero.dff", 210)
engineReplaceModel(sniperdff, 210)
--cachorro
txd = engineLoadTXD("dog/germansheperd.txd")
engineImportTXD(txd, 300)
dff = engineLoadDFF("dog/germansheperd.dff", 300)
engineReplaceModel(dff, 300)
       
txd = engineLoadTXD("dog/hottweiler.txd")
engineImportTXD(txd, 301)
dff = engineLoadDFF("dog/hottweiler.dff", 301)
engineReplaceModel(dff, 301)
       
txd = engineLoadTXD("dog/pitbullblack.txd")
engineImportTXD(txd, 302)
dff = engineLoadDFF("dog/pitbullblack.dff", 302)
engineReplaceModel(dff, 302)
       
txd = engineLoadTXD("dog/pitbullwhite.txd")
engineImportTXD(txd, 303)
dff = engineLoadDFF("dog/pitbullwhite.dff", 303)
engineReplaceModel(dff, 303)
       
txd = engineLoadTXD("dog/werewolf.txd")
engineImportTXD(txd, 304)
dff = engineLoadDFF("dog/werewolf.dff", 304)
engineReplaceModel(dff, 304)
       
txd = engineLoadTXD("dog/policesheperd.txd")
engineImportTXD(txd, 305)
dff = engineLoadDFF("dog/policesheperd.dff", 306)
engineReplaceModel(dff, 305)
        --
itemTXD = engineLoadTXD("items/army_clothes.txd")
engineImportTXD(itemTXD, 1247)
itemDFF = engineLoadDFF("items/army_clothes.dff", 1247)
engineReplaceModel(itemDFF, 1247)
itemTXD = engineLoadTXD("items/sniper_clothes.txd")
engineImportTXD(itemTXD, 1213)
itemDFF = engineLoadDFF("items/sniper_clothes.dff", 1213)
engineReplaceModel(itemDFF, 1213)
itemTXD = engineLoadTXD("items/civilian_clothes.txd")
engineImportTXD(itemTXD, 1241)
itemDFF = engineLoadDFF("items/civilian_clothes.dff", 1241)
engineReplaceModel(itemDFF, 1241)
itemTXD = engineLoadTXD("items/standard_clothes.txd")
engineImportTXD(itemTXD, 1577)
itemDFF = engineLoadDFF("items/standard_clothes.dff", 1577)
engineReplaceModel(itemDFF, 1577)
itemTXD = engineLoadTXD("items/beans_can.txd")
engineImportTXD(itemTXD, 2601)
itemDFF = engineLoadDFF("items/beans_can.dff", 2601)
engineReplaceModel(itemDFF, 2601)
itemTXD = engineLoadTXD("items/first_aid_kit.txd")
engineImportTXD(itemTXD, 2891)
itemDFF = engineLoadDFF("items/first_aid_kit.dff", 2891)
engineReplaceModel(itemDFF, 2891)
itemTXD = engineLoadTXD("items/heat_pack.txd")
engineImportTXD(itemTXD, 1576)
itemDFF = engineLoadDFF("items/heat_pack.dff", 1576)
engineReplaceModel(itemDFF, 1576)
itemTXD = engineLoadTXD("items/pain_killers.txd")
engineImportTXD(itemTXD, 2709)
itemDFF = engineLoadDFF("items/pain_killers.dff", 2709)
engineReplaceModel(itemDFF, 2709)
itemTXD = engineLoadTXD("items/pasta_can.txd")
engineImportTXD(itemTXD, 2770)
itemDFF = engineLoadDFF("items/pasta_can.dff", 2770)
engineReplaceModel(itemDFF, 2770)
itemTXD = engineLoadTXD("items/pistol_ammo.txd")
engineImportTXD(itemTXD, 3013)
itemDFF = engineLoadDFF("items/pistol_ammo.dff", 3013)
engineReplaceModel(itemDFF, 3013)
itemTXD = engineLoadTXD("items/shotgun_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/shotgun_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/backpack_small.txd")
engineImportTXD(itemTXD, 3026)
itemDFF = engineLoadDFF("items/backpack_small.dff", 3026)
engineReplaceModel(itemDFF, 3026)
itemTXD = engineLoadTXD("items/smg_ammo.txd")
engineImportTXD(itemTXD, 2041)
itemDFF = engineLoadDFF("items/smg_ammo.dff", 2041)
engineReplaceModel(itemDFF, 2041)
itemTXD = engineLoadTXD("items/sniper_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/sniper_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/soda_can.txd")
engineImportTXD(itemTXD, 2647)
itemDFF = engineLoadDFF("items/soda_can.dff", 2647)
engineReplaceModel(itemDFF, 2647)
itemTXD = engineLoadTXD("items/water_bottle.txd")
engineImportTXD(itemTXD, 2683)
itemDFF = engineLoadDFF("items/water_bottle.dff", 2683)
engineReplaceModel(itemDFF, 2683)
itemTXD = engineLoadTXD("items/assault_ammo.txd")
engineImportTXD(itemTXD, 1271)
itemDFF = engineLoadDFF("items/assault_ammo.dff", 1271)
engineReplaceModel(itemDFF, 1271)
itemTXD = engineLoadTXD("items/backpack_alice.txd")
engineImportTXD(itemTXD, 1248)
itemDFF = engineLoadDFF("items/backpack_alice.dff", 1248)
engineReplaceModel(itemDFF, 1248)
itemTXD = engineLoadTXD("items/backpack_coyote.txd")
engineImportTXD(itemTXD, 1252)
itemDFF = engineLoadDFF("items/backpack_coyote.dff", 1252)
engineReplaceModel(itemDFF, 1252)
itemTXD = engineLoadTXD("items/backpack_czech.txd")
engineImportTXD(itemTXD, 2472)
itemDFF = engineLoadDFF("items/backpack_czech.dff", 2472)
engineReplaceModel(itemDFF, 2472)
--Novas Mochilas
itemTXD = engineLoadTXD("items/backpack_survival.txd")
engineImportTXD(itemTXD, 2405)
itemDFF = engineLoadDFF("items/backpack_survival.dff", 2405)
engineReplaceModel(itemDFF, 2405)
--
--Novas Mochilas
itemTXD = engineLoadTXD("items/backpack_british.txd")
engineImportTXD(itemTXD, 2406)
itemDFF = engineLoadDFF("items/backpack_british.dff", 2406)
engineReplaceModel(itemDFF, 2406)
--
--Novas Mochilas
itemTXD = engineLoadTXD("items/backpack_patrol.txd")
engineImportTXD(itemTXD, 2407)
itemDFF = engineLoadDFF("items/backpack_patrol.dff", 2407)
engineReplaceModel(itemDFF, 2407)
--
--Novas Mochilas
itemTXD = engineLoadTXD("items/backpack_vest.txd")
engineImportTXD(itemTXD, 2408)
itemDFF = engineLoadDFF("items/backpack_vest.dff", 2408)
engineReplaceModel(itemDFF, 2408)
--
itemTXD = engineLoadTXD("items/tent.txd")
engineImportTXD(itemTXD, 3243)
itemDFF = engineLoadDFF("items/tent.dff", 3243)
engineReplaceModel(itemDFF, 3243)
itemTXD = engineLoadTXD("items/wirefence.txd")
engineImportTXD(itemTXD, 983)
itemDFF = engineLoadDFF("items/wirefence.dff", 983)
engineReplaceModel(itemDFF, 983)
weaponTXD = engineLoadTXD("items/camera.txd")
engineImportTXD(weaponTXD, 367)
weaponDFF = engineLoadDFF("items/camera.dff", 367)
engineReplaceModel(weaponDFF, 367)
weaponTXD = engineLoadTXD("items/katana.txd")
engineImportTXD(weaponTXD, 339)
weaponDFF = engineLoadDFF("items/katana.dff", 339)
engineReplaceModel(weaponDFF, 339)
function playerStatsClientSite()
  if getElementData(getLocalPlayer(), "logedin") then
    toggleControl("radar", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("radar", false)
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("breath", false)
    if getElementData(getLocalPlayer(), "Map") >= 1 then
      toggleControl("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "GPS") then
      showPlayerHudComponent("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "Watch") then
      showPlayerHudComponent("clock", true)
    end
  end
end
setTimer(playerStatsClientSite, 1000, 0)
function playerZoom(key, keyState)
  if key == "n" then
    if getElementData(getLocalPlayer(), "Night Vision Goggles") > 0 then
      if nightvision then
        nightvision = false
        setCameraGoggleEffect("normal")
        do
          local hour, minutes = getTime()
          if gameplayVariables.enablenight then
            setClientNight(hour, minutes)
          end
        end
      else
        nightvision = true
        setCameraGoggleEffect("nightvision")
        setFarClipDistance(1000)
      end
    end
  elseif key == "i" and 0 < getElementData(getLocalPlayer(), "Infrared Goggles") then
    if infaredvision then
      infaredvision = false
      setCameraGoggleEffect("normal")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...