Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
11 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
113 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
150 行
すべてコピー
477 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
506 行
すべてコピー
コピー
コピー済み
コピー
コピー済み
util.AddNetworkString("DarkRP_PlayerVar")
util.AddNetworkString("DarkRP_UpdateDoorData")
util.AddNetworkString("DarkRP_RemoveDoorData")
util.AddNetworkString("DarkRP_AllDoorData")
/*---------------------------------------------------------------------------
/*---------------------------------------------------------------------------
コピー
コピー済み
コピー
コピー済み
Interface f
unctions
F
unctions
---------------------------------------------------------------------------*/
---------------------------------------------------------------------------*/
コピー
コピー済み
コピー
コピー済み
local eMeta = FindMetaTable("Entity")
function
m
eta:
keysLock
()
function
eM
eta:
getDoorData
()
self:Fire("lock", "", 0)
if
not
self:
isKeysOwnable()
then return
{}
end
if
isfunction(self.Lock) then
self:
Lock(true) end -- SCars
if IsValid(self.EntOwner) and self.EntOwner ~= self
then return
self.EntOwner:keysLock()
end
-- SCars
コピー
コピー済み
コピー
コピー済み
self.DoorData = self.DoorData or {}
hook.Call("onKeysLocked", nil,
self
)
return
self
.DoorData
end
end
コピー
コピー済み
コピー
コピー済み
function
eM
eta:
setKeysNonOwnable(ownable
)
function
m
eta:
keysUnLock(
)
self:
getDoorData().nonOwnable = ownable
self:
Fire("unlock", "", 0)
DarkRP.updateDoorData
(self
, "nonOwnable")
if isfunction(self.UnLock) then self:UnLock(true) end -- SCars
end
if IsValid
(self
.EntOwner) and self.EntOwner ~= self then return self.EntOwner:keysUnLock()
end
-- SCars
コピー
コピー済み
コピー
コピー済み
function eMeta:setKeysTitle(title)
hook.Call("onKeysUnlocked", nil,
self
)
self:getDoorData().title = title
DarkRP.updateDoorData(
self
, "title"
)
end
end
コピー
コピー済み
コピー
コピー済み
function
eMeta:setDoorGroup(group)
function
meta:keysOwn(ply)
self:getDoorData().groupOwn = group
if self:isKeysAllowedToOwn(ply) then
DarkRP.updateDoorData(self, "
groupOwn")
self:addKeysDoorOwner(ply)
return
end
local Owner = self:CPPIGetOwner()
-- Increase vehicle count
if self:IsVehicle() then
if IsValid(ply) then
ply.Vehicles = ply.Vehicles or 0
ply.Vehicles = ply.Vehicles + 1
end
-- Decrease vehicle count of the original owner
if IsValid(Owner) and Owner ~= ply then
Owner.Vehicles = Owner.Vehicles or 1
Owner.Vehicles = Owner.Vehicles - 1
end
end
if self:IsVehicle() then
self:CPPISetOwner(ply)
end
if not self:isKeysOwned() and not self:isKeysOwnedBy(ply) then
local doorData = self:getDoorData()
doorData.owner = ply
DarkRP.updateDoorData(self, "
owner")
end
if ply:GetTable().OwnedNumz == 0 then
timer.Create(ply:UniqueID() .. "propertytax", 270, 0, function() ply.doPropertyTax(ply) end)
end
ply:GetTable().OwnedNumz = ply:GetTable().OwnedNumz + 1
ply:GetTable().Ownedz[self:EntIndex()] = self
end
end
コピー
コピー済み
コピー
コピー済み
function
eM
eta:
addKeysDoorTeam(t
)
function
m
eta:
keysUnOwn(ply
)
local doorData
= self:
getDoorData()
if not ply then
doorData.teamOwn = doorData.teamOwn or {}
ply
= self:
getDoorOwner()
doorData.teamOwn[t] = true
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "
teamOwn")
if not IsValid(ply) then return end
end
if self:isMasterOwner(ply) then
local doorData = self:getDoorData()
doorData.owner = nil
DarkRP.updateDoorData(self, "
owner")
else
self:removeKeysDoorOwner(ply)
end
ply:GetTable().Ownedz[self:EntIndex()] = nil
ply:GetTable().OwnedNumz = math.Clamp(ply:GetTable().OwnedNumz - 1, 0, math.huge)
end
end
コピー
コピー済み
コピー
コピー済み
function
eMeta:removeKeysDoorTeam(t)
function
pmeta:keysUnOwnAll()
local doorData = self:getDoorData()
for k, v in pairs(ents.GetAll()) do
doorData.teamOwn = doorData.teamOwn or {}
if v:isKeysOwnable() and v:isKeysOwnedBy(self) == true then
doorData.teamOwn[t] = nil
v:Fire("unlock", "", 0.6)
end
end
コピー
コピー済み
コピー
コピー済み
if
fn.Null(doorData.teamOwn)
then
if
self:GetTable().Ownedz
then
doorData.teamOwn
= nil
for k, v in pairs(self.Ownedz) do
if not v:isKeysOwnable() then self.Ownedz[k] = nil continue end
v:keysUnOwn(self)
self.Ownedz[v:EntIndex()]
= nil
end
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "teamOwn")
for k, v in pairs(player.GetAll()) do
if v.Ownedz then
for n, m in pairs(v.Ownedz) do
if IsValid(m) and m:isKeysAllowedToOwn(self) then
m:removeKeysAllowedToOwn(self)
end
end
end
end
self.OwnedNumz = 0
end
end
コピー
コピー済み
コピー
コピー済み
function
eMeta:removeAllKeysDoorTeams
()
function
pmeta:doPropertyTax
()
local doorData =
self:
getDoorData()
if not GAMEMODE.Config.propertytax then return end
doorData.teamOwn = nil
if
self:
isCP() and GAMEMODE.Config.cit_propertytax then return end
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "teamOwn")
local numowned = self.OwnedNumz
if not numowned or numowned <= 0 then return end
local price = 10
local tax = price * numowned + math.random(-5, 5)
if self:canAfford(tax) then
if tax ~= 0 then
self:addMoney(-tax)
DarkRP.notify(self, 0, 5, DarkRP.getPhrase("property_tax", GAMEMODE.Config.currency .. tax))
end
else
DarkRP.notify(self, 1, 8, DarkRP.getPhrase("property_tax_cant_afford"))
self:keysUnOwnAll()
end
end
end
コピー
コピー済み
コピー
コピー済み
function
eMeta:addKeysAllowedToOwn(ply
)
function
pmeta:initiateTax(
)
local
doorData = self:getDoorData()
local
taxtime = GAMEMODE.Config.wallettaxtime
doorData.allowedToOwn = doorData.allowedToOwn or {}
local uniqueid = self:UniqueID() -- so we can destroy the timer if the player leaves
doorData.allowedToOwn[ply:EntIndex()] = true
timer.Create("rp_tax_"..uniqueid, taxtime or 600, 0, function()
if not IsValid(self) then
timer.Destroy("rp_tax_"..uniqueid)
return
end
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "allowedToOwn")
if not GAMEMODE.Config.wallettax then
return -- Don't remove the hook in case it's turned on afterwards.
end
local money = self:getDarkRPVar("money")
local mintax = GAMEMODE.Config.wallettaxmin / 100
local maxtax = GAMEMODE.Config.wallettaxmax / 100 -- convert to decimals for percentage calculations
local startMoney = GAMEMODE.Config.startingmoney
if money < (startMoney * 2) then
return -- Don't tax players if they have less than twice the starting amount
end
-- Variate the taxes between twice the starting money ($1000 by default) and 200 - 2 times the starting money (100.000 by default)
local tax = (money - (startMoney * 2)) / (startMoney * 198)
tax = math.Min(maxtax, mintax + (maxtax - mintax) * tax)
self:addMoney(-tax * money)
DarkRP.notify(self, 3, 7, DarkRP.getPhrase("taxday", math.Round(tax * 100, 3)))
end)
end
end
コピー
コピー済み
コピー
コピー済み
function
eMeta:removeKeysAllowedToOwn
(ply)
/*---------------------------------------------------------------------------
local doorData = self:getDoorData()
Commands
doorData.allowedToOwn = doorData.allowedToOwn or {}
---------------------------------------------------------------------------*/
doorData.allowedToOwn[ply:EntIndex()] = nil
local time = false
local
function
SetDoorOwnable
(ply)
if time then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/toggleownable"))
return ""
end
time = true
timer.Simple(0.1, function() time = false end)
コピー
コピー済み
コピー
コピー済み
if
fn.Null(doorData.allowedToOwn
) then
if
not ply:hasDarkRPPrivilege("rp_doorManipulation"
) then
doorData.allowedToOwn = nil
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("no_privilege"))
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "allowedToOwn")
local trace = ply:GetEyeTrace()
end
local ent = trace.Entity
if not IsValid(ent) or (not ent:isDoor() and not ent:IsVehicle()) or ply:GetPos():Distance(ent:GetPos()) > 200 then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle")))
return
end
コピー
コピー済み
コピー
コピー済み
function eMeta
:removeAllKeysAllowedToOwn()
if IsValid(ent:getDoorOwner()) then
local doorData = self:getDoorData(
)
ent:keysUnOwn(ent:getDoorOwner())
doorData.allowedToOwn =
nil
end
ent:setKeysNonOwnable(not ent:getKeysNonOwnable())
ent:removeAllKeysExtraOwners()
ent
:removeAllKeysAllowedToOwn()
ent:removeAllKeysDoorTeams()
ent:setDoorGroup(nil
)
ent:setKeysTitle(
nil
)
コピー
コピー済み
コピー
コピー済み
DarkRP.
updat
eDoorData(
self, "allowedToOwn")
-- Save it for future map loads
DarkRP.
stor
eDoorData(
ent)
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.defineChatCommand("toggleownable", SetDoorOwnable)
コピー
コピー済み
コピー
コピー済み
function eMeta:addKeysDoorOwner(ply)
local time3 = false
local doorData = self:getDoorData()
local function SetDoorGroupOwnable(ply, arg)
doorData.extraOwners = doorData.extraOwners or {}
if time3 then
doorData.extraOwners[ply:EntIndex()]
= true
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/togglegroupownable"))
return ""
end
time3
= true
timer.Simple(0.1, function() time3 = false end)
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "extraOwners"
)
local trace = ply:GetEyeTrace(
)
コピー
コピー済み
コピー
コピー済み
self:removeKeysAllowedToOwn(ply)
if not ply:hasDarkRPPrivilege("rp_doorManipulation") then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("no_privilege"))
return ""
end
local ent = trace.Entity
if not IsValid(ent) or (not ent:isDoor() and not ent:IsVehicle()) or ply:GetPos():Distance(ent:GetPos()) > 200 then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle")))
return
end
if not RPExtraTeamDoors[arg] and arg ~= "" then DarkRP.notify(ply, 1, 10, DarkRP.getPhrase("door_group_doesnt_exist")) return "" end
ent:keysUnOwn()
ent:removeAllKeysDoorTeams()
local group = arg ~= "" and arg or nil
ent:setDoorGroup(group)
-- Save it for future map loads
DarkRP.storeDoorGroup(ent, group)
DarkRP.storeTeamDoorOwnability(ent)
DarkRP.notify(ply, 0, 8, DarkRP.getPhrase("door_group_set"))
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.defineChatCommand("togglegroupownable", SetDoorGroupOwnable)
コピー
コピー済み
コピー
コピー済み
function eMeta:removeKeysDoorOwner(ply)
local time4 = false
local doorData = self:getDoorData()
local function SetDoorTeamOwnable(ply, arg)
doorData.extraOwners = doorData.extraOwners or {}
if time4 then
doorData.extraOwners[ply:EntIndex()] = nil
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/toggleteamownable"))
return ""
end
time4 = true
timer.Simple( 0.1, function() time4 = false end )
local trace = ply:GetEyeTrace()
コピー
コピー済み
コピー
コピー済み
if
fn.Null(doorData.extraOwners
) then
local ent = trace.Entity
doorData.extraOwners = nil
if
not ply:hasDarkRPPrivilege("rp_doorManipulation"
) then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("no_privilege"))
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "extraOwners")
if not IsValid(ent) or (not ent:isDoor() and not ent:IsVehicle()) or ply:GetPos():Distance(ent:GetPos()) > 200 then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle")))
return ""
end
arg = tonumber(arg)
if not RPExtraTeams[arg] and arg ~= nil then DarkRP.notify(ply, 1, 10, DarkRP.getPhrase("job_doesnt_exist")) return "" end
if IsValid(ent:getDoorOwner()) then
ent:keysUnOwn(ent:getDoorOwner())
end
ent:setDoorGroup(nil)
DarkRP.storeDoorGroup(ent, nil)
local doorTeams = ent:getKeysDoorTeams()
if not doorTeams or not doorTeams[arg] then
ent:addKeysDoorTeam(arg)
else
ent:removeKeysDoorTeam(arg)
end
DarkRP.notify(ply, 0, 8, DarkRP.getPhrase("door_group_set"))
DarkRP.storeTeamDoorOwnability(ent)
ent:keysUnOwn()
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.defineChatCommand("toggleteamownable", SetDoorTeamOwnable)
コピー
コピー済み
コピー
コピー済み
function eMeta:removeAllKeysExtraOwners()
local time2 = false
local
doorData
=
self:getDoorData
()
local function OwnDoor(ply)
doorData.extraOwners
=
nil
if time2 then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/toggleown"))
return ""
end
time2 = true
timer.Simple(0.1, function() time2 = false end)
local
team
=
ply:Team
()
local trace
=
ply:GetEyeTrace()
コピー
コピー済み
コピー
コピー済み
DarkRP.updateDoorData(self, "extraOwners")
if IsValid(trace.Entity) and trace.Entity:isKeysOwnable() and ply:GetPos():Distance(trace.Entity:GetPos()) < 200 then
local Owner = trace.Entity:CPPIGetOwner()
if ply:isArrested() then
DarkRP.notify(ply, 1, 5, DarkRP.getPhrase("door_unown_arrested"))
return ""
end
if trace.Entity:getKeysNonOwnable() or trace.Entity:getKeysDoorGroup() or not fn.Null(trace.Entity:getKeysDoorTeams() or {}) then
DarkRP.notify(ply, 1, 5, DarkRP.getPhrase("door_unownable"))
return ""
end
if trace.Entity:isKeysOwnedBy(ply) then
if trace.Entity:isMasterOwner(ply) then
trace.Entity:removeAllKeysExtraOwners()
trace.Entity:removeAllKeysAllowedToOwn()
trace.Entity:Fire("unlock", "", 0)
end
trace.Entity:keysUnOwn(ply)
trace.Entity:setKeysTitle(nil)
local GiveMoneyBack = math.floor((((trace.Entity:IsVehicle() and GAMEMODE.Config.vehiclecost) or GAMEMODE.Config.doorcost) * 0.666) + 0.5)
hook.Call("playerKeysSold", GAMEMODE, ply, trace.Entity, GiveMoneyBack)
ply:addMoney(GiveMoneyBack)
local bSuppress = hook.Call("hideSellDoorMessage", GAMEMODE, ply, trace.Entity)
if( !bSuppress ) then
DarkRP.notify(ply, 0, 4, DarkRP.getPhrase("door_sold", GAMEMODE.Config.currency..(GiveMoneyBack)))
end
else
if trace.Entity:isKeysOwned() and not trace.Entity:isKeysAllowedToOwn(ply) then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("door_already_owned"))
return ""
end
local iCost = hook.Call("get".. (trace.Entity:IsVehicle() and "Vehicle" or "Door").."Cost", GAMEMODE, ply, trace.Entity);
if( !ply:canAfford( iCost ) ) then
DarkRP.notify( ply, 1, 4, trace.Entity:IsVehicle() and DarkRP.getPhrase("vehicle_cannot_afford") or DarkRP.getPhrase("door_cannot_afford"))
return "";
end
local bAllowed, strReason, bSuppress = hook.Call("playerBuy"..( trace.Entity:IsVehicle() and "Vehicle" or "Door"), GAMEMODE, ply, trace.Entity)
if( bAllowed == false ) then
if( strReason and strReason != "") then
DarkRP.notify( ply, 1, 4, strReason)
end
return "";
end
local bVehicle = trace.Entity:IsVehicle();
if bVehicle and (ply.Vehicles or 0) >= GAMEMODE.Config.maxvehicles and Owner ~= ply then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("limit", DarkRP.getPhrase("vehicle")))
return ""
end
if not bVehicle and (ply.OwnedNumz or 0) >= GAMEMODE.Config.maxdoors then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("limit", DarkRP.getPhrase("door")))
return ""
end
ply:addMoney(-iCost)
if( !bSuppress ) then
DarkRP.notify( ply, 0, 4, bVehicle and DarkRP.getPhrase("vehicle_bought", GAMEMODE.Config.currency, iCost) or DarkRP.getPhrase("door_bought", GAMEMODE.Config.currency, iCost))
end
trace.Entity:keysOwn(ply)
hook.Call("playerBought"..(bVehicle and "Vehicle" or "Door"), GAMEMODE, ply, trace.Entity, iCost);
end
return ""
end
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle")))
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.defineChatCommand("toggleown", OwnDoor)
コピー
コピー済み
コピー
コピー済み
function eMeta:removeDoorData()
local function UnOwnAll(ply, cmd, args)
net.Start("DarkRP_RemoveDoorData")
local amount = 0
net.WriteUInt(self:EntIndex(), 32)
for k,v in pairs(ents.GetAll()) do
net.Send(player.GetAll())
if v:isKeysOwnedBy(ply) and not IsValid(v.EntOwner) --[[SCars]]then
amount = amount + 1
v:Fire("unlock", "", 0)
v:keysUnOwn(ply)
local cost = (v:IsVehicle() and GAMEMODE.Config.vehiclecost or GAMEMODE.Config.doorcost) * 2/3 + 0.5
ply:addMoney(math.floor(cost))
ply:GetTable().Ownedz[v:EntIndex()] = nil
end
end
ply:GetTable().OwnedNumz = 0
DarkRP.notify(ply, 2, 4, DarkRP.getPhrase("sold_x_doors_for_y", amount, GAMEMODE.Config.currency, amount * math.floor(((GAMEMODE.Config.doorcost * 0.66666666666666)+0.5))))
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.defineChatCommand("unownalldoors", UnOwnAll)
コピー
コピー済み
コピー
コピー済み
/*---------------------------------------------------------------------------
Networking
---------------------------------------------------------------------------*/
local function sendDoorData(ply)
if ply:EntIndex() == 0 then return end
if ply.doorDataSent and ply.doorDataSent > (CurTime() - 1) then return end -- prevent spammers
コピー
コピー済み
コピー
コピー済み
local
res = {}
local
function SetDoorTitle(ply, args)
for k,v in pairs(ents.GetAll()) do
local trace = ply:GetEyeTrace()
if not IsValid(v) or not v.DoorData then continue end
コピー
コピー済み
コピー
コピー済み
res[v:EntIndex()] = v.DoorData
if not IsValid(trace.Entity) or not trace.Entity:isKeysOwnable() or ply:GetPos():Distance(trace.Entity:GetPos()) >= 110 then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle")))
return ""
end
end
コピー
コピー済み
コピー
コピー済み
net.Start("DarkRP_AllDoorData")
if ply:IsSuperAdmin() then
net.WriteTable(res)
if trace.Entity:getKeysNonOwnable() or trace.Entity:getKeysDoorGroup() or not fn.Null(trace.Entity:getKeysDoorTeams() or {}) then
net.Send(ply)
trace.Entity:setKeysTitle(args)
DarkRP.storeDoorData(trace.Entity)
return ""
end
elseif trace.Entity:getKeysNonOwnable() then
DarkRP.notify(ply, 1, 6, DarkRP.getPhrase("need_admin", "/title"))
end
if not trace.Entity:isKeysOwnedBy(ply) then
DarkRP.notify(ply, 1, 6, DarkRP.getPhrase("door_need_to_own", "/title"))
return ""
end
trace.Entity:setKeysTitle(args)
return ""
end
end
コピー
コピー済み
コピー
コピー済み
concommand.Add("_sendAllDoorData
",
sendDoorData
)
DarkRP.defineChatCommand("title
",
SetDoorTitle
)
コピー
コピー済み
コピー
コピー済み
function
DarkRP.updateDoorData(door, member
)
local
function
RemoveDoorOwner(ply, args
)
if not IsValid(door) or not door.DoorData then error("Calling updateDoorData on a door that has no data!") end
local trace = ply:GetEyeTrace()
コピー
コピー済み
コピー
コピー済み
net.Start("DarkRP_UpdateDoorData")
if not IsValid(trace.Entity) or not trace.Entity:isKeysOwnable() or ply:GetPos():Distance(trace.Entity:GetPos()) >= 110 then
net.WriteUInt(door:EntIndex(), 32)
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle")))
net.WriteString(member)
return ""
net.WriteType(door.DoorData[member])
end
net.Send(player.GetAll())
target = DarkRP.findPlayer(args)
if trace.Entity:getKeysNonOwnable() then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("door_rem_owners_unownable"))
return ""
end
if not target then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("could_not_find", tostring(args)))
return ""
end
if not trace.Entity:isKeysOwnedBy(ply) then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("do_not_own_ent"))
return ""
end
local canDo = hook.Call("onAllowedToOwnRemoved", nil, ply, trace.Entity, target)
if canDo == false then return "" end
if trace.Entity:isKeysAllowedToOwn(target) then
trace.Entity:removeKeysAllowedToOwn(target)
end
if trace.Entity:isKeysOwnedBy(target) then
trace.Entity:removeKeysDoorOwner(target)
end
return ""
end
DarkRP.defineChatCommand("removeowner", RemoveDoorOwner)
DarkRP.defineChatCommand("ro", RemoveDoorOwner)
local function AddDoorOwner(ply, args)
local trace = ply:GetEyeTrace()
if not IsValid(trace.Entity) or not trace.Entity:isKeysOwnable() or ply:GetPos():Distance(trace.Entity:GetPos()) >= 110 then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle")))
return ""
end
target = DarkRP.findPlayer(args)
if trace.Entity:getKeysNonOwnable() then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("door_add_owners_unownable"))
return ""
end
if not target then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("could_not_find", tostring(args)))
return ""
end
if not trace.Entity:isKeysOwnedBy(ply) then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("do_not_own_ent"))
return ""
end
if trace.Entity:isKeysOwnedBy(target) or trace.Entity:isKeysAllowedToOwn(target) then
DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("rp_addowner_already_owns_door", ply:Nick()))
return ""
end
local canDo = hook.Call("onAllowedToOwnAdded", nil, ply, trace.Entity, target)
if canDo == false then return "" end
trace.Entity:addKeysAllowedToOwn(target)
return ""
end
end
コピー
コピー済み
コピー
コピー済み
DarkRP.defineChatCommand("addowner", AddDoorOwner)
DarkRP.defineChatCommand("ao", AddDoorOwner)
保存された差分
原文
ファイルを開く
util.AddNetworkString("DarkRP_PlayerVar") util.AddNetworkString("DarkRP_UpdateDoorData") util.AddNetworkString("DarkRP_RemoveDoorData") util.AddNetworkString("DarkRP_AllDoorData") /*--------------------------------------------------------------------------- Interface functions ---------------------------------------------------------------------------*/ local eMeta = FindMetaTable("Entity") function eMeta:getDoorData() if not self:isKeysOwnable() then return {} end self.DoorData = self.DoorData or {} return self.DoorData end function eMeta:setKeysNonOwnable(ownable) self:getDoorData().nonOwnable = ownable DarkRP.updateDoorData(self, "nonOwnable") end function eMeta:setKeysTitle(title) self:getDoorData().title = title DarkRP.updateDoorData(self, "title") end function eMeta:setDoorGroup(group) self:getDoorData().groupOwn = group DarkRP.updateDoorData(self, "groupOwn") end function eMeta:addKeysDoorTeam(t) local doorData = self:getDoorData() doorData.teamOwn = doorData.teamOwn or {} doorData.teamOwn[t] = true DarkRP.updateDoorData(self, "teamOwn") end function eMeta:removeKeysDoorTeam(t) local doorData = self:getDoorData() doorData.teamOwn = doorData.teamOwn or {} doorData.teamOwn[t] = nil if fn.Null(doorData.teamOwn) then doorData.teamOwn = nil end DarkRP.updateDoorData(self, "teamOwn") end function eMeta:removeAllKeysDoorTeams() local doorData = self:getDoorData() doorData.teamOwn = nil DarkRP.updateDoorData(self, "teamOwn") end function eMeta:addKeysAllowedToOwn(ply) local doorData = self:getDoorData() doorData.allowedToOwn = doorData.allowedToOwn or {} doorData.allowedToOwn[ply:EntIndex()] = true DarkRP.updateDoorData(self, "allowedToOwn") end function eMeta:removeKeysAllowedToOwn(ply) local doorData = self:getDoorData() doorData.allowedToOwn = doorData.allowedToOwn or {} doorData.allowedToOwn[ply:EntIndex()] = nil if fn.Null(doorData.allowedToOwn) then doorData.allowedToOwn = nil end DarkRP.updateDoorData(self, "allowedToOwn") end function eMeta:removeAllKeysAllowedToOwn() local doorData = self:getDoorData() doorData.allowedToOwn = nil DarkRP.updateDoorData(self, "allowedToOwn") end function eMeta:addKeysDoorOwner(ply) local doorData = self:getDoorData() doorData.extraOwners = doorData.extraOwners or {} doorData.extraOwners[ply:EntIndex()] = true DarkRP.updateDoorData(self, "extraOwners") self:removeKeysAllowedToOwn(ply) end function eMeta:removeKeysDoorOwner(ply) local doorData = self:getDoorData() doorData.extraOwners = doorData.extraOwners or {} doorData.extraOwners[ply:EntIndex()] = nil if fn.Null(doorData.extraOwners) then doorData.extraOwners = nil end DarkRP.updateDoorData(self, "extraOwners") end function eMeta:removeAllKeysExtraOwners() local doorData = self:getDoorData() doorData.extraOwners = nil DarkRP.updateDoorData(self, "extraOwners") end function eMeta:removeDoorData() net.Start("DarkRP_RemoveDoorData") net.WriteUInt(self:EntIndex(), 32) net.Send(player.GetAll()) end /*--------------------------------------------------------------------------- Networking ---------------------------------------------------------------------------*/ local function sendDoorData(ply) if ply:EntIndex() == 0 then return end if ply.doorDataSent and ply.doorDataSent > (CurTime() - 1) then return end -- prevent spammers local res = {} for k,v in pairs(ents.GetAll()) do if not IsValid(v) or not v.DoorData then continue end res[v:EntIndex()] = v.DoorData end net.Start("DarkRP_AllDoorData") net.WriteTable(res) net.Send(ply) end concommand.Add("_sendAllDoorData", sendDoorData) function DarkRP.updateDoorData(door, member) if not IsValid(door) or not door.DoorData then error("Calling updateDoorData on a door that has no data!") end net.Start("DarkRP_UpdateDoorData") net.WriteUInt(door:EntIndex(), 32) net.WriteString(member) net.WriteType(door.DoorData[member]) net.Send(player.GetAll()) end
変更されたテキスト
ファイルを開く
/*--------------------------------------------------------------------------- Functions ---------------------------------------------------------------------------*/ function meta:keysLock() self:Fire("lock", "", 0) if isfunction(self.Lock) then self:Lock(true) end -- SCars if IsValid(self.EntOwner) and self.EntOwner ~= self then return self.EntOwner:keysLock() end -- SCars hook.Call("onKeysLocked", nil, self) end function meta:keysUnLock() self:Fire("unlock", "", 0) if isfunction(self.UnLock) then self:UnLock(true) end -- SCars if IsValid(self.EntOwner) and self.EntOwner ~= self then return self.EntOwner:keysUnLock() end -- SCars hook.Call("onKeysUnlocked", nil, self) end function meta:keysOwn(ply) if self:isKeysAllowedToOwn(ply) then self:addKeysDoorOwner(ply) return end local Owner = self:CPPIGetOwner() -- Increase vehicle count if self:IsVehicle() then if IsValid(ply) then ply.Vehicles = ply.Vehicles or 0 ply.Vehicles = ply.Vehicles + 1 end -- Decrease vehicle count of the original owner if IsValid(Owner) and Owner ~= ply then Owner.Vehicles = Owner.Vehicles or 1 Owner.Vehicles = Owner.Vehicles - 1 end end if self:IsVehicle() then self:CPPISetOwner(ply) end if not self:isKeysOwned() and not self:isKeysOwnedBy(ply) then local doorData = self:getDoorData() doorData.owner = ply DarkRP.updateDoorData(self, "owner") end if ply:GetTable().OwnedNumz == 0 then timer.Create(ply:UniqueID() .. "propertytax", 270, 0, function() ply.doPropertyTax(ply) end) end ply:GetTable().OwnedNumz = ply:GetTable().OwnedNumz + 1 ply:GetTable().Ownedz[self:EntIndex()] = self end function meta:keysUnOwn(ply) if not ply then ply = self:getDoorOwner() if not IsValid(ply) then return end end if self:isMasterOwner(ply) then local doorData = self:getDoorData() doorData.owner = nil DarkRP.updateDoorData(self, "owner") else self:removeKeysDoorOwner(ply) end ply:GetTable().Ownedz[self:EntIndex()] = nil ply:GetTable().OwnedNumz = math.Clamp(ply:GetTable().OwnedNumz - 1, 0, math.huge) end function pmeta:keysUnOwnAll() for k, v in pairs(ents.GetAll()) do if v:isKeysOwnable() and v:isKeysOwnedBy(self) == true then v:Fire("unlock", "", 0.6) end end if self:GetTable().Ownedz then for k, v in pairs(self.Ownedz) do if not v:isKeysOwnable() then self.Ownedz[k] = nil continue end v:keysUnOwn(self) self.Ownedz[v:EntIndex()] = nil end end for k, v in pairs(player.GetAll()) do if v.Ownedz then for n, m in pairs(v.Ownedz) do if IsValid(m) and m:isKeysAllowedToOwn(self) then m:removeKeysAllowedToOwn(self) end end end end self.OwnedNumz = 0 end function pmeta:doPropertyTax() if not GAMEMODE.Config.propertytax then return end if self:isCP() and GAMEMODE.Config.cit_propertytax then return end local numowned = self.OwnedNumz if not numowned or numowned <= 0 then return end local price = 10 local tax = price * numowned + math.random(-5, 5) if self:canAfford(tax) then if tax ~= 0 then self:addMoney(-tax) DarkRP.notify(self, 0, 5, DarkRP.getPhrase("property_tax", GAMEMODE.Config.currency .. tax)) end else DarkRP.notify(self, 1, 8, DarkRP.getPhrase("property_tax_cant_afford")) self:keysUnOwnAll() end end function pmeta:initiateTax() local taxtime = GAMEMODE.Config.wallettaxtime local uniqueid = self:UniqueID() -- so we can destroy the timer if the player leaves timer.Create("rp_tax_"..uniqueid, taxtime or 600, 0, function() if not IsValid(self) then timer.Destroy("rp_tax_"..uniqueid) return end if not GAMEMODE.Config.wallettax then return -- Don't remove the hook in case it's turned on afterwards. end local money = self:getDarkRPVar("money") local mintax = GAMEMODE.Config.wallettaxmin / 100 local maxtax = GAMEMODE.Config.wallettaxmax / 100 -- convert to decimals for percentage calculations local startMoney = GAMEMODE.Config.startingmoney if money < (startMoney * 2) then return -- Don't tax players if they have less than twice the starting amount end -- Variate the taxes between twice the starting money ($1000 by default) and 200 - 2 times the starting money (100.000 by default) local tax = (money - (startMoney * 2)) / (startMoney * 198) tax = math.Min(maxtax, mintax + (maxtax - mintax) * tax) self:addMoney(-tax * money) DarkRP.notify(self, 3, 7, DarkRP.getPhrase("taxday", math.Round(tax * 100, 3))) end) end /*--------------------------------------------------------------------------- Commands ---------------------------------------------------------------------------*/ local time = false local function SetDoorOwnable(ply) if time then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/toggleownable")) return "" end time = true timer.Simple(0.1, function() time = false end) if not ply:hasDarkRPPrivilege("rp_doorManipulation") then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("no_privilege")) return "" end local trace = ply:GetEyeTrace() local ent = trace.Entity if not IsValid(ent) or (not ent:isDoor() and not ent:IsVehicle()) or ply:GetPos():Distance(ent:GetPos()) > 200 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle"))) return end if IsValid(ent:getDoorOwner()) then ent:keysUnOwn(ent:getDoorOwner()) end ent:setKeysNonOwnable(not ent:getKeysNonOwnable()) ent:removeAllKeysExtraOwners() ent:removeAllKeysAllowedToOwn() ent:removeAllKeysDoorTeams() ent:setDoorGroup(nil) ent:setKeysTitle(nil) -- Save it for future map loads DarkRP.storeDoorData(ent) return "" end DarkRP.defineChatCommand("toggleownable", SetDoorOwnable) local time3 = false local function SetDoorGroupOwnable(ply, arg) if time3 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/togglegroupownable")) return "" end time3 = true timer.Simple(0.1, function() time3 = false end) local trace = ply:GetEyeTrace() if not ply:hasDarkRPPrivilege("rp_doorManipulation") then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("no_privilege")) return "" end local ent = trace.Entity if not IsValid(ent) or (not ent:isDoor() and not ent:IsVehicle()) or ply:GetPos():Distance(ent:GetPos()) > 200 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle"))) return end if not RPExtraTeamDoors[arg] and arg ~= "" then DarkRP.notify(ply, 1, 10, DarkRP.getPhrase("door_group_doesnt_exist")) return "" end ent:keysUnOwn() ent:removeAllKeysDoorTeams() local group = arg ~= "" and arg or nil ent:setDoorGroup(group) -- Save it for future map loads DarkRP.storeDoorGroup(ent, group) DarkRP.storeTeamDoorOwnability(ent) DarkRP.notify(ply, 0, 8, DarkRP.getPhrase("door_group_set")) return "" end DarkRP.defineChatCommand("togglegroupownable", SetDoorGroupOwnable) local time4 = false local function SetDoorTeamOwnable(ply, arg) if time4 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/toggleteamownable")) return "" end time4 = true timer.Simple( 0.1, function() time4 = false end ) local trace = ply:GetEyeTrace() local ent = trace.Entity if not ply:hasDarkRPPrivilege("rp_doorManipulation") then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("no_privilege")) return "" end if not IsValid(ent) or (not ent:isDoor() and not ent:IsVehicle()) or ply:GetPos():Distance(ent:GetPos()) > 200 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle"))) return "" end arg = tonumber(arg) if not RPExtraTeams[arg] and arg ~= nil then DarkRP.notify(ply, 1, 10, DarkRP.getPhrase("job_doesnt_exist")) return "" end if IsValid(ent:getDoorOwner()) then ent:keysUnOwn(ent:getDoorOwner()) end ent:setDoorGroup(nil) DarkRP.storeDoorGroup(ent, nil) local doorTeams = ent:getKeysDoorTeams() if not doorTeams or not doorTeams[arg] then ent:addKeysDoorTeam(arg) else ent:removeKeysDoorTeam(arg) end DarkRP.notify(ply, 0, 8, DarkRP.getPhrase("door_group_set")) DarkRP.storeTeamDoorOwnability(ent) ent:keysUnOwn() return "" end DarkRP.defineChatCommand("toggleteamownable", SetDoorTeamOwnable) local time2 = false local function OwnDoor(ply) if time2 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("have_to_wait", "0.1", "/toggleown")) return "" end time2 = true timer.Simple(0.1, function() time2 = false end) local team = ply:Team() local trace = ply:GetEyeTrace() if IsValid(trace.Entity) and trace.Entity:isKeysOwnable() and ply:GetPos():Distance(trace.Entity:GetPos()) < 200 then local Owner = trace.Entity:CPPIGetOwner() if ply:isArrested() then DarkRP.notify(ply, 1, 5, DarkRP.getPhrase("door_unown_arrested")) return "" end if trace.Entity:getKeysNonOwnable() or trace.Entity:getKeysDoorGroup() or not fn.Null(trace.Entity:getKeysDoorTeams() or {}) then DarkRP.notify(ply, 1, 5, DarkRP.getPhrase("door_unownable")) return "" end if trace.Entity:isKeysOwnedBy(ply) then if trace.Entity:isMasterOwner(ply) then trace.Entity:removeAllKeysExtraOwners() trace.Entity:removeAllKeysAllowedToOwn() trace.Entity:Fire("unlock", "", 0) end trace.Entity:keysUnOwn(ply) trace.Entity:setKeysTitle(nil) local GiveMoneyBack = math.floor((((trace.Entity:IsVehicle() and GAMEMODE.Config.vehiclecost) or GAMEMODE.Config.doorcost) * 0.666) + 0.5) hook.Call("playerKeysSold", GAMEMODE, ply, trace.Entity, GiveMoneyBack) ply:addMoney(GiveMoneyBack) local bSuppress = hook.Call("hideSellDoorMessage", GAMEMODE, ply, trace.Entity) if( !bSuppress ) then DarkRP.notify(ply, 0, 4, DarkRP.getPhrase("door_sold", GAMEMODE.Config.currency..(GiveMoneyBack))) end else if trace.Entity:isKeysOwned() and not trace.Entity:isKeysAllowedToOwn(ply) then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("door_already_owned")) return "" end local iCost = hook.Call("get".. (trace.Entity:IsVehicle() and "Vehicle" or "Door").."Cost", GAMEMODE, ply, trace.Entity); if( !ply:canAfford( iCost ) ) then DarkRP.notify( ply, 1, 4, trace.Entity:IsVehicle() and DarkRP.getPhrase("vehicle_cannot_afford") or DarkRP.getPhrase("door_cannot_afford")) return ""; end local bAllowed, strReason, bSuppress = hook.Call("playerBuy"..( trace.Entity:IsVehicle() and "Vehicle" or "Door"), GAMEMODE, ply, trace.Entity) if( bAllowed == false ) then if( strReason and strReason != "") then DarkRP.notify( ply, 1, 4, strReason) end return ""; end local bVehicle = trace.Entity:IsVehicle(); if bVehicle and (ply.Vehicles or 0) >= GAMEMODE.Config.maxvehicles and Owner ~= ply then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("limit", DarkRP.getPhrase("vehicle"))) return "" end if not bVehicle and (ply.OwnedNumz or 0) >= GAMEMODE.Config.maxdoors then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("limit", DarkRP.getPhrase("door"))) return "" end ply:addMoney(-iCost) if( !bSuppress ) then DarkRP.notify( ply, 0, 4, bVehicle and DarkRP.getPhrase("vehicle_bought", GAMEMODE.Config.currency, iCost) or DarkRP.getPhrase("door_bought", GAMEMODE.Config.currency, iCost)) end trace.Entity:keysOwn(ply) hook.Call("playerBought"..(bVehicle and "Vehicle" or "Door"), GAMEMODE, ply, trace.Entity, iCost); end return "" end DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle"))) return "" end DarkRP.defineChatCommand("toggleown", OwnDoor) local function UnOwnAll(ply, cmd, args) local amount = 0 for k,v in pairs(ents.GetAll()) do if v:isKeysOwnedBy(ply) and not IsValid(v.EntOwner) --[[SCars]]then amount = amount + 1 v:Fire("unlock", "", 0) v:keysUnOwn(ply) local cost = (v:IsVehicle() and GAMEMODE.Config.vehiclecost or GAMEMODE.Config.doorcost) * 2/3 + 0.5 ply:addMoney(math.floor(cost)) ply:GetTable().Ownedz[v:EntIndex()] = nil end end ply:GetTable().OwnedNumz = 0 DarkRP.notify(ply, 2, 4, DarkRP.getPhrase("sold_x_doors_for_y", amount, GAMEMODE.Config.currency, amount * math.floor(((GAMEMODE.Config.doorcost * 0.66666666666666)+0.5)))) return "" end DarkRP.defineChatCommand("unownalldoors", UnOwnAll) local function SetDoorTitle(ply, args) local trace = ply:GetEyeTrace() if not IsValid(trace.Entity) or not trace.Entity:isKeysOwnable() or ply:GetPos():Distance(trace.Entity:GetPos()) >= 110 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle"))) return "" end if ply:IsSuperAdmin() then if trace.Entity:getKeysNonOwnable() or trace.Entity:getKeysDoorGroup() or not fn.Null(trace.Entity:getKeysDoorTeams() or {}) then trace.Entity:setKeysTitle(args) DarkRP.storeDoorData(trace.Entity) return "" end elseif trace.Entity:getKeysNonOwnable() then DarkRP.notify(ply, 1, 6, DarkRP.getPhrase("need_admin", "/title")) end if not trace.Entity:isKeysOwnedBy(ply) then DarkRP.notify(ply, 1, 6, DarkRP.getPhrase("door_need_to_own", "/title")) return "" end trace.Entity:setKeysTitle(args) return "" end DarkRP.defineChatCommand("title", SetDoorTitle) local function RemoveDoorOwner(ply, args) local trace = ply:GetEyeTrace() if not IsValid(trace.Entity) or not trace.Entity:isKeysOwnable() or ply:GetPos():Distance(trace.Entity:GetPos()) >= 110 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle"))) return "" end target = DarkRP.findPlayer(args) if trace.Entity:getKeysNonOwnable() then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("door_rem_owners_unownable")) return "" end if not target then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("could_not_find", tostring(args))) return "" end if not trace.Entity:isKeysOwnedBy(ply) then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("do_not_own_ent")) return "" end local canDo = hook.Call("onAllowedToOwnRemoved", nil, ply, trace.Entity, target) if canDo == false then return "" end if trace.Entity:isKeysAllowedToOwn(target) then trace.Entity:removeKeysAllowedToOwn(target) end if trace.Entity:isKeysOwnedBy(target) then trace.Entity:removeKeysDoorOwner(target) end return "" end DarkRP.defineChatCommand("removeowner", RemoveDoorOwner) DarkRP.defineChatCommand("ro", RemoveDoorOwner) local function AddDoorOwner(ply, args) local trace = ply:GetEyeTrace() if not IsValid(trace.Entity) or not trace.Entity:isKeysOwnable() or ply:GetPos():Distance(trace.Entity:GetPos()) >= 110 then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("must_be_looking_at", DarkRP.getPhrase("door_or_vehicle"))) return "" end target = DarkRP.findPlayer(args) if trace.Entity:getKeysNonOwnable() then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("door_add_owners_unownable")) return "" end if not target then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("could_not_find", tostring(args))) return "" end if not trace.Entity:isKeysOwnedBy(ply) then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("do_not_own_ent")) return "" end if trace.Entity:isKeysOwnedBy(target) or trace.Entity:isKeysAllowedToOwn(target) then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("rp_addowner_already_owns_door", ply:Nick())) return "" end local canDo = hook.Call("onAllowedToOwnAdded", nil, ply, trace.Entity, target) if canDo == false then return "" end trace.Entity:addKeysAllowedToOwn(target) return "" end DarkRP.defineChatCommand("addowner", AddDoorOwner) DarkRP.defineChatCommand("ao", AddDoorOwner)
違いを見つける