Showing weapon that we've added on Buy Menu 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*Change it with weapons name and the price (example, Plasma $3000)
If you want to add more weapon, just do that steps, but for the script for the Resource/UI little defferent on xpos and ypos. xpos and ypos is the position of weapon image, label, and button in but menu. In the Script there are 3 xpos and ypos, that is for Image panel, Label, and Button.
This is the tips how to fill xpos and ypos:
That is for weapon image size like the pict bellow
But you can modify it, i just give an example.
But you can modify it, i just give an example.
Contoh hasil percobaan saya
If the weapon has been showed on buy menu but you can't buy it, just open cstrike or czero/addons/amxmodx/config/nst_mywpn.ini, and then change the "ENABLE = 1" into "ENABLE = 0"
Wassalamu'alaikum wr wb
Also read --> How to add weapon in CS/CZ
if you want to try my mods, you can download it here
Tried disabling nst_mywpn, broke the game. Using nst_myvpn, my added gun is not in my weapons
BalasHapusfound the solution. go to console and type nst_wpn and you will see your weapons!
BalasHapus