Garry's Mod
十分な評価がありません
Evan's Entity Equipped on Spawn Addon
   
アワード
お気に入り
お気に入り
お気に入りから削除
Content Type: Addon
Addon Type: ServerContent
Addon Tags: Fun, Roleplay
ファイルサイズ
投稿日
510.000 B
2018年5月21日 17時04分
1 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Evan's Entity Equipped on Spawn Addon

解説
This is a rudimentary addon that can be used on servers to give certain players entities that are equipable when they spawn and respawn. Using the people you want to have certain entities Steam IDs and entering them into the STEAM_ID table in the test.lua file, these players will now have equipable entities on spawn.
5 件のコメント
Brgmry 2020年12月12日 11時31分 
local configTable = {
"TEAM_XYZ"
}
local TeamTbl = {}
hook.Add("Initialize", "convertTeamIds", function()
for index, teamStr in ipairs(configTable) do
local id = _G[teamStr]
if id then
TeamTbl[id] = true
end
end
end)

hook.Add("PlayerSpawn", "Player_Spawn_Give_Thing", function(ply)
if TeamTbl[ply:Team()] then
local ent = ents.Create("starwars_jetpack") --insert any equipable entity here
ent:SetSlotName( ent:GetClass() )
ent:SetPos(ply:GetPos())
ent:SetOwner(ply)
ent:Spawn()
ent:Activate()
ent:Use( ply, ply, USE_ON, -1 )
end
end)
Cyclops 2020年12月8日 23時11分 
How would I equip the entity to a job rather than a specific player?
Brgmry 2020年4月15日 8時14分 
ents.Create is returning a nil value for me
Brgmry 2020年4月15日 8時13分 
Is this meant to work?
Ren 2019年4月1日 0時14分 
Holy shit. Where has this been with the Clone Jetpack?