MattJeanes / TARDIS

Time and Relative Dimension in Space, for Garry's Mod
MIT License
63 stars 27 forks source link

DarkRP F4 - Invisible when spawned - SRCDS Error #878

Open ybother123 opened 1 year ago

ybother123 commented 1 year ago

The srcds error [TARDIS] lua/tardis/libraries/libraries/sh_settings.lua:159: Networked setting nointerior was requested for invalid player [NULL Entity]

  1. error - [C]:-1
    1. GetSetting - lua/tardis/libraries/libraries/sh_settings.lua:159
    2. v - lua/entities/gmod_tardis/modules/sv_interior.lua:34
      1. CallHook - lua/entities/gmod_tardis/shared.lua:70
      2. v - lua/entities/gmod_door_exterior/modules/sh_interior.lua:88
      3. CallHook - lua/entities/gmod_door_exterior/shared.lua:32
      4. CallHook - lua/entities/gmod_tardis/shared.lua:64
        1. Initialize - lua/entities/gmod_door_exterior/init.lua:75
        2. unknown - lua/entities/gmod_tardis/init.lua:34
        3. Spawn - [C]:-1
        4. defaultSpawn - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:308
          1. callback - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:366
          2. callback - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:17

DarkRP.createEntity("tardis", { ent = "gmod_tardis", model = "models/props_c17/TrapPropeller_Engine.mdl", -- just a placeholder of course price = 2, max = 44, cmd = "buygunlabsdf", allowed = TEAM_CITIZEN })

image

MattJeanes commented 1 year ago

Hey, to spawn the TARDIS in DarkRP you need to use a custom spawn function:

spawn = function(ply, tr, tblEnt)
    return TARDIS:SpawnTardis(ply, {metadataID = "default"}, true)
end

"default" here is the interior ID, you can find this by using the tardis2_spawnmenu_copy_id 1 in sandbox - it'll add a new option when you right click on the interiors for "copy ID".

Note currently this will only work for admins but there is a fix being released in the next day or two that will make it work for everyone.