Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function GoodSpawn(ply, tr, tblE)
- -- Code made by Falco
- -- Tweaked by Stalker cuz Falco is a dummy sometimes
- local ent = ents.Create(tblE.ent)
- if not ent:IsValid() then error("Entity '" .. tblE.ent .. "' does not exist or is not valid.") end
- ent.dt = ent.dt or {}
- ent.dt.owning_ent = ply
- if ent.Setowning_ent then ent:Setowning_ent(ply) end
- local pos = ply:GetEyeTrace().HitPos
- ent:SetPos(pos)
- -- These must be set before :Spawn()
- ent.SID = ply.SID
- ent.allowed = tblE.allowed
- ent.DarkRPItem = tblE
- ent:Spawn()
- local phys = ent:GetPhysicsObject()
- if phys:IsValid() then phys:Wake() end
- return ent
- end
- ----------------------------------------------------------------------------------------------------------------------------
- DarkRP.createEntity("TANK TEST FIX", {
- ent = "sent_Challenger_2_p",
- model = "models/Killstr3aKs/WoT/British/Challenger_2_tracks_l.mdl","models/Killstr3aKs/WoT/British/Challenger_2_tracks_r.mdl",
- price = 0,
- max = 50,
- cmd = "TankTestFix",
- allowed = {TEAM_RAFPVT, TEAM_RAFSGT},
- -- This part is the only new thing you have to care about (AND THIS BIT HE ADDED)
- spawn = function(ply, tr, tblEnt)
- return GoodSpawn(ply, tr, tblEnt)
- end
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement