Вопрос Проблема с Xenin BattlePass

  • 39
  • 2
Контакты для связи отсутствуют.
Использую консольные команды battlepass_give_pass и battlepass_give_tier и далее пишу свой Стим айди, но ничего не выдаётся, что делать? Аддон качал вроде бы с паблика ffdev. Луа ошибок связанных с ним нету.

Код консольных команд:
Код консольных команд:
concommand.Add("battlepass_give_pass", function(ply, cmd, args)
  if (IsValid(ply)) then return end
  local sid64 = tostring(args[1])
  if (!sid64) then ErrorNoHalt("No sid64 argument") return end
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if (convert) then
    sid64 = util.SteamIDTo64(sid64)
  end

  local ply = player.GetBySteamID64(sid64)
  if (IsValid(ply)) then
    BATTLEPASS:SetOwned(ply, true)

    net.Start("BATTLEPASS.GivePass")
    net.Send(ply)
  else
    BATTLEPASS.Database:SetOwned(sid64)
  end
end)

concommand.Add("battlepass_remove_pass", function(ply, cmd, args)
  if (IsValid(ply)) then return end
  local sid64 = tostring(args[1])
  if (!sid64) then ErrorNoHalt("No sid64 argument") return end
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if (convert) then
    sid64 = util.SteamIDTo64(sid64)
  end

  local ply = player.GetBySteamID64(sid64)
  if (IsValid(ply)) then
    BATTLEPASS:SetOwned(ply, false)

    net.Start("BATTLEPASS.RemovePass")
    net.Send(ply)
  else
    BATTLEPASS.Database:RemoveOwned(sid64)
  end
end)

concommand.Add("battlepass_give_tier", function(ply, cmd, args)
  if (IsValid(ply)) then return end
  local sid64 = tostring(args[1])
  if (!sid64) then ErrorNoHalt("No sid64 argument") return end
  local tiers = math.Round(tonumber(args[2]))
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if (convert) then
    sid64 = util.SteamIDTo64(sid64)
  end
 
  local ply = player.GetBySteamID64(sid64)
  if (IsValid(ply)) then
    BATTLEPASS:AddTier(ply, tiers)

    tiers = ply.BattlePass.Owned.tier or 0
    net.Start("BATTLEPASS.SetTiers")
      net.WriteUInt(tiers, 16)
    net.Send(ply)
  else
    BATTLEPASS.Database:AddTiers(sid64, tiers)
  end
end)
 
  • 436
  • 7
  • 54
Эти команды работают исправно, просто их нужно вводить не в самой игре, а в консоль.
 
  • 246
  • 13
  • 53
xd:
concommand.Add("battlepass_give_pass", function(ply, cmd, args)
  if ply:IsValid() then return end
  local sid64 = tostring(args[1])
  if !sid64 then ErrorNoHalt("No sid64 argument") return end
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if (convert) then
    sid64 = util.SteamIDTo64(sid64)
  end

  local ply = player.GetBySteamID64(sid64)
  if (IsValid(ply)) then
    BATTLEPASS:SetOwned(ply, true)

    net.Start("BATTLEPASS.GivePass")
    net.Send(ply)
  else
    BATTLEPASS.Database:SetOwned(sid64)
  end
end)

concommand.Add("battlepass_remove_pass", function(ply, cmd, args)
  if ply:IsValid() then return end
  local sid64 = tostring(args[1])
  if !sid64 then ErrorNoHalt("No sid64 argument") return end
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if convert then
    sid64 = util.SteamIDTo64(sid64)
  end

  local ply = player.GetBySteamID64(sid64)
  if ply:IsValid() then
    BATTLEPASS:SetOwned(ply, false)

    net.Start("BATTLEPASS.RemovePass")
    net.Send(ply)
  else
    BATTLEPASS.Database:RemoveOwned(sid64)
  end
end)

concommand.Add("battlepass_give_tier", function(ply, cmd, args)
  if ply:IsValid() then return end
  local sid64 = tostring(args[1])
  if !sid64 then ErrorNoHalt("No sid64 argument") return end
  local tiers = math.Round(tonumber(args[2]))
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if convert then
    sid64 = util.SteamIDTo64(sid64)
  end
 
  local ply = player.GetBySteamID64(sid64)
  if ply:IsValid() then
    BATTLEPASS:AddTier(ply, tiers)

    tiers = ply.BattlePass.Owned.tier or 0
    net.Start("BATTLEPASS.SetTiers")
      net.WriteUInt(tiers, 16)
    net.Send(ply)
  else
    BATTLEPASS.Database:AddTiers(sid64, tiers)
  end
end)

Попробуй на локалке это еще провести по LocalPlayer()
 
  • 436
  • 7
  • 54
xd:
concommand.Add("battlepass_give_pass", function(ply, cmd, args)
  if ply:IsValid() then return end
  local sid64 = tostring(args[1])
  if !sid64 then ErrorNoHalt("No sid64 argument") return end
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if (convert) then
    sid64 = util.SteamIDTo64(sid64)
  end

  local ply = player.GetBySteamID64(sid64)
  if (IsValid(ply)) then
    BATTLEPASS:SetOwned(ply, true)

    net.Start("BATTLEPASS.GivePass")
    net.Send(ply)
  else
    BATTLEPASS.Database:SetOwned(sid64)
  end
end)

concommand.Add("battlepass_remove_pass", function(ply, cmd, args)
  if ply:IsValid() then return end
  local sid64 = tostring(args[1])
  if !sid64 then ErrorNoHalt("No sid64 argument") return end
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if convert then
    sid64 = util.SteamIDTo64(sid64)
  end

  local ply = player.GetBySteamID64(sid64)
  if ply:IsValid() then
    BATTLEPASS:SetOwned(ply, false)

    net.Start("BATTLEPASS.RemovePass")
    net.Send(ply)
  else
    BATTLEPASS.Database:RemoveOwned(sid64)
  end
end)

concommand.Add("battlepass_give_tier", function(ply, cmd, args)
  if ply:IsValid() then return end
  local sid64 = tostring(args[1])
  if !sid64 then ErrorNoHalt("No sid64 argument") return end
  local tiers = math.Round(tonumber(args[2]))
  local convert = isstring(sid64) and sid64:find("STEAM") or false
  if convert then
    sid64 = util.SteamIDTo64(sid64)
  end
 
  local ply = player.GetBySteamID64(sid64)
  if ply:IsValid() then
    BATTLEPASS:AddTier(ply, tiers)

    tiers = ply.BattlePass.Owned.tier or 0
    net.Start("BATTLEPASS.SetTiers")
      net.WriteUInt(tiers, 16)
    net.Send(ply)
  else
    BATTLEPASS.Database:AddTiers(sid64, tiers)
  end
end)

Попробуй на локалке это еще провести по LocalPlayer()
Ты скинул код, а чё поменялось?
 
Сверху Снизу