mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 21:33:02 +05:00
Compare commits
2 commits
ee92e0cc19
...
fa800eb51f
Author | SHA1 | Date | |
---|---|---|---|
|
fa800eb51f | ||
|
9e005f61c9 |
2 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue