Compare commits

...

2 commits

Author SHA1 Message Date
Jonny_Bro (Nikita)
fa800eb51f
Update shared.lua 2024-05-29 10:25:41 +05:00
Jonny_Bro (Nikita)
9e005f61c9
Accidentally removed some important lines in DataTheft :) 2024-05-29 10:24:56 +05:00
2 changed files with 8 additions and 3 deletions

View file

@ -124,10 +124,10 @@ local meta = FindMetaTable("Player")
if SERVER then
function meta:DataTheft_Bank()
local dbtbl = ents.FindByClass("br_databank")
local bank = dbtbl[math.random(1, #dbtbl)]
local bank = dbtbl[math.random(#dbtbl)]
if bank then
self:SetNW2Entity("DataBank", bank)
end
end
end
end

View file

@ -9,6 +9,11 @@ if SERVER then
net.Broadcast()
for _, v in ipairs(player.GetAll()) do
v:DataTheft_Bank()
v:SetNW2Int("DataCubes", 0)
v:SetNW2Int("DataBanked", 0)
if v:GetMoveType() == MOVETYPE_NOCLIP then
v:SetMoveType(MOVETYPE_WALK)
v:Spawn()
@ -107,4 +112,4 @@ if CLIENT then
hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName)
chat.AddText(Color(200, 200, 200), language.GetPhrase("beatrun.datatheft.start"))
end)
end
end