The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.3.6 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.3.6 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined variable $awaitingusers - Line: 33 - File: global.php(844) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/global.php(844) : eval()'d code 33 errorHandler->error
/global.php 844 eval
/showthread.php 26 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.3.6 (Linux)
File Line Function
/global.php 909 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined variable $jumpsel - Line: 5 - File: inc/functions.php(2963) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php(2963) : eval()'d code 5 errorHandler->error
/inc/functions.php 2963 eval
/showthread.php 621 build_forum_jump
Warning [2] Trying to access array offset on null - Line: 5 - File: inc/functions.php(2963) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php(2963) : eval()'d code 5 errorHandler->error
/inc/functions.php 2963 eval
/showthread.php 621 build_forum_jump
Warning [2] Undefined property: MyLanguage::$forumjump_select - Line: 5 - File: inc/functions.php(2963) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php(2963) : eval()'d code 5 errorHandler->error
/inc/functions.php 2963 eval
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1952 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 1952 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 629 mark_thread_read
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(732) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/showthread.php(732) : eval()'d code 5 errorHandler->error
/showthread.php 732 eval
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.3.6 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1506 - File: showthread.php PHP 8.3.6 (Linux)
File Line Function
/showthread.php 1506 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1533) : eval()'d code PHP 8.3.6 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 30 errorHandler->error
/showthread.php 1533 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add Weapon :/
#1
Sad 
Hello, it's 7 hours I try to add a new weapon someone can help me

Code:
local Item = QuickCreateItemTable(BaseWeapon, "weapon_axe_test", "Epée test", "TEST", "icons/weapon_axe")
Item = AddModel(Item, "models/props_canal/mattpipe.mdl", Vector(-0.6, 0.8, -5.9), Angle(4.7, 56.9, -176))
Item = AddStats(Item, 1, 1)
Item = AddSound(Item, "weapons/iceaxe/iceaxe_swing1.wav")
Item.Level = 1
Item.Weight = 1
Item.SellPrice = 1
Item.Dropable = false
Item.Giveable = false
Item.CanCutWood = true
Register.Item(Item)
The model is not displayed in the game
Reply
#2
Code:
Item = AddModel(Item, "models/props_canal/mattpipe.mdl", Vector(-0.6, 0.8, -5.9), Angle(4.7, 56.9, -176))
Is not used.

The models for items in Underdone are made using PAC3.
You can find that data in "garrysmod\gamemodes\underdone\gamemode\core\sharedfiles\database\models"
For example the Christmas hat data is

Code:
pac_luamodel["armor_helm_xmashat"] = {
[1] = {
    ["children"] = {
        [1] = {
            ["children"] = {
            },
            ["self"] = {
                ["Angles"] = Angle(-71.113586425781, 143.75730895996, 60.092720031738),
                ["UniqueID"] = "2843482023",
                ["ClassName"] = "model",
                ["Model"] = "models/player/items/all_class/oh_xmas_tree_demo.mdl",
                ["Position"] = Vector(2.28125, -2.24169921875, -1.5880432128906),
            },
        },
    },
    ["self"] = {
        ["EditorExpand"] = true,
        ["UniqueID"] = "3466398423",
        ["ClassName"] = "group",
        ["Name"] = "my outfit",
        ["Description"] = "add parts to me!",
    },
},
}

To edit this data in the PAC3 editor you need to save the following information to a .txt file in your pac3 data folder.
Install PAC3 to sandbox version of gmod.
Code:
[1] = {
    ["children"] = {
        [1] = {
            ["children"] = {
            },
            ["self"] = {
                ["Angles"] = Angle(-71.113586425781, 143.75730895996, 60.092720031738),
                ["UniqueID"] = "2843482023",
                ["ClassName"] = "model",
                ["Model"] = "models/player/items/all_class/oh_xmas_tree_demo.mdl",
                ["Position"] = Vector(2.28125, -2.24169921875, -1.5880432128906),
            },
        },
    },
    ["self"] = {
        ["EditorExpand"] = true,
        ["UniqueID"] = "3466398423",
        ["ClassName"] = "group",
        ["Name"] = "my outfit",
        ["Description"] = "add parts to me!",
    },
},

As you can see the first line and the last closing bracket of the original code is used in UD only, this tells the game mode that the item called "armor_helm_xmashat" will use that PAC3 data.

I have rushed this post, but I am sure it will give you some insight at least.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)