Welcome to My Blog

Showing Your Added Weapon in Buy Menu Counterstrike/Condition Zero (CS/CZ)

Cara Menampilkan Senjata Yang Kita Tambahkan di Buy Menu pada CS/CZ

Assalamu'alaikum wr wb
Hi guys, this is the return of the previous post,That is How to add weapon in CS/CZ. After the weapon that we want has been added, of course we want to buy and try it, but that weapon not available in buy menu. So now i am gonne tell you how to add it.


  • Firt, we need a picture of weapon that we want (side view). You can google it.
  • After that open it in photoshop. For better result, remove/clear the background (the only remaining weapon pictures), if you can.
  • Then, save the picture with the size 235x81, resolution 32 pixels, and format .tga (targa)
  • Named it with the model name of the weapon that we add.
  • After that, save it in cstrike atau czero(depending on which games you play)/gfx/vgui folder
We have added the picture of the weapon, i will tell you how to show it on buy menu.
  • In cstrike or czero(depending on which games you play)/resource/UI folder, Make a new text document here.
  • Rename it to "Buy(Kind of weapon, example: rifles, pistol, shotgun etc.) with format .res. Example: BuyRifles_CT for CT, dan BuyRifles_TER for Terrorist
  • After that open it and paste the script below.  

"Resource/UI/BuyRifles_CT.res"
{
"BuyRifles_CT"
{
"ControlName" "WizardSubPanel"
"fieldName" "BuyRifles_CT"
"xpos" "50"
"ypos" "10"
"wide" "552"
"tall" "448"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
}

"Title"
{
"ControlName" "Label"
"fieldName" "Title"
"xpos" "76"
"ypos" "22"
"wide" "500"
"tall" "48"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "Rifles"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"font" "Title"
"wrap" "0"
}

"ItemInfo"
{
"ControlName" "Panel"
"fieldName" "ItemInfo"
"xpos" "0"
"ypos" "0"
"wide" "0"
"tall" "0"
"autoResize" "3"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
}
// ################################################################################################"1-weapon1-img"
"1-weapon1-img"
        {
                                "ControlName"                 "ImagePanel"
                                "fieldName"                                       "1-weapon1-img"
                                "xpos"                                                  "30"
                                "ypos"                                                  "85"
                                "wide"                                                  "138"
                                "tall"                                                      "48"
                                "autoResize"                      "0"
                                "pinCorner"                                        "0"
                                "visible"                                               "1"
                                "enabled"                                           "1"
                                "textAlignment"                               "center"
                // 1-weapon1-img
                                "image"                                                                "gfx/vgui/(weapon picture name)"
                                "scaleImage"                     "1"
                }
                "1-weapon1-name"
                {
                                "ControlName"                 "Label"
                                "fieldName"                                       "1-weapon1-name"
                                "xpos"                                                  "30"
                                "ypos"                                                  "133"
                                "wide"                                                  "138"
                                "tall"                                                      "15"
                                "autoResize"                      "0"
                                "pinCorner"                                        "0"
                                "visible"                                               "1"
                                "enabled"                                           "1"
                // 1-weapon1-name
                                "labelText"                                         "(weapons name and price)"
                                "textAlignment"                               "center"
                                "dulltext"                                            "1"
                                "brighttext"                        "0"
                }
                "1-weapon1-bottom"
                {
                                "ControlName"                 "Button"
                                "fieldName"                                       "1-weapon1-bottom"
                                "xpos"                                                  "30"
                                "ypos"                                                  "85"
                                "wide"                                                  "138"
                                "tall"                                                      "63"
                                "autoResize"                      "0"
                                "pinCorner"                                        "2"
                                "visible"                                               "1"
                                "enabled"                                           "1"
                                "tabPosition"                     "0"
                                "labelText"                                         ""
                // 1-weapon1-bottom
                                "command"                                                        "nst_buy_mywpn (weapon's model name)"
                }

// ################################################################################################

"CancelButton"
{
"ControlName" "MouseOverPanelButton"
"fieldName" "CancelButton"
"xpos" "474"
"ypos" "40"
"wide" "138"
"tall" "20"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"labelText" "#Cstrike_Cancel"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"Command" "vguicancel"
"Default" "1"
}

*Change it with the model weapon's name in gfx/vgui folder
*Change it with weapons name and the price (example, Plasma $3000)
*Change it with new model weapons name that we added it before

Jika anda ingin menambah senjata yang anda inginkan lagi anda tinggal melakukan langkah sama seperti sebelumnya,tetapi untuk script pada resource nya agak berbeda yaitu pada xpos dan ypos nya. xpos dan ypos merupakan posisi gambar senjata dan label pada buy menu. Dalam script tersebut terdapat 3 xpos dan ypos, yaitu untuk Image panel, Label, dan Button. Berikut adalah rumus/cara memberi xpos dan ypos.

Ket: Semakin kebawah y ditambah 73, dan semakin kekiri x ditambah 148


Contoh hasil percobaan saya

*Nb: kekurangan untuk cara saya ini adalah senjata lama tidak ikut muncul di buy menu,jadi harus menambahkannya sendiri
Bila senjata sudah muncul di buy menu tetapi tidak bisa dibeli, coba buka nst_mywpn.ini lalu ubah ENABLE = 1 menjadi ENABLE = 0

Sekian informasi saya tentang menambah senjata di CS/CZ/CSPB, kurang lebihnya mohon maaf
Wassalamu'alaikum wr wb

Baca juga --> Cara Menambah Senjata pada CS/CZ

Bila ingin coba lihat hasil aslinya bisa didownload gamenya disini 

0 comments:

Copyright © 2013 Games On