Help Me - how to add custom weapons in Yyg's PUB-G server?

Started by MRSK143, May 20, 2021, 10:23 AM

Previous topic - Next topic

MRSK143

I Need Help From You @Yyg Plz help me to add weapons in your pubg dm server :'( plz help me
@mR_Sk@

Yyg

#1
Glad someone remembered the Pubg server, in fact you only need to add Custom Weapon according to the VCMP rules

You can /exec FindPlayer(playerID).SetWeapon(weaponID, 999); to see if the MOD has been added successfully (at which point you should get the MOD weapon)

If you want add new custom weapon, Maybe you need add to the "pickup weapon", you might need to create some new pickups, as well as write the frequency of new weapon IDs, slots, and random ammo (many of which should be found here at "Statics. nut").

About how to fill the modified armory, I can't remember it too long, please, by checking the script, you probably need to do the following:
Weapon ID change: store\script\main.nut(g_WEAPONPOOLS)
Remember to add a similar "Item Image" for store\sprites\GameMenu\CMenu_Backpack\WeaponItems (this may require you to modify the Image yourself)

Since this server has always been an experimental project, it is best to keep the number of items consistent, i.e. try not to exceed the current total number of weapons, but to replace undesirable weapons

My English is not good, you can try it according to the general idea.

MRSK143

Quote from: Yyg on May 20, 2021, 11:11 AMGlad someone remembered the Pubg server, in fact you only need to add Custom Weapon according to the VCMP rules

You can /exec FindPlayer(playerID).SetWeapon(weaponID, 999); to see if the MOD has been added successfully (at which point you should get the MOD weapon)

If you want add new custom weapon, Maybe you need add to the "pickup weapon", you might need to create some new pickups, as well as write the frequency of new weapon IDs, slots, and random ammo (many of which should be found here at "Statics. nut").

About how to fill the modified armory, I can't remember it too long, please, by checking the script, you probably need to do the following:
Weapon ID change: store\script\main.nut(g_WEAPONPOOLS)
Remember to add a similar "Item Image" for store\sprites\GameMenu\CMenu_Backpack\WeaponItems (this may require you to modify the Image yourself)

Since this server has always been an experimental project, it is best to keep the number of items consistent, i.e. try not to exceed the current total number of weapons, but to replace undesirable weapons

My English is not good, you can try it according to the general idea.

dude i changed that but it stuck on there

https://ibb.co/6DJ8K7n

now how can i fix that?
@mR_Sk@

Yyg

Quote from: MRSK143 on May 20, 2021, 11:55 AMdude i changed that but it stuck on there

https://ibb.co/6DJ8K7n

now how can i fix that?
If you do not find any errors in the server console, it means that there is no problem with your server script. It is likely that there are some errors in the client script.

You can see the error log in %appdata%\VCMP\04beta\debuglog.txt, it will tell which scripts found what kind of errors.
Maybe this file contains content by default, I suggest you clear this file first, and then enter the game again, it will write the latest error report

If you can't read well, you can send debug_log to me and I will try my best to help you view it :D

MRSK143

Quote from: Yyg on May 21, 2021, 02:23 AM
Quote from: MRSK143 on May 20, 2021, 11:55 AMdude i changed that but it stuck on there

https://ibb.co/6DJ8K7n

now how can i fix that?
If you do not find any errors in the server console, it means that there is no problem with your server script. It is likely that there are some errors in the client script.

You can see the error log in %appdata%\VCMP\04beta\debuglog.txt, it will tell which scripts found what kind of errors.
Maybe this file contains content by default, I suggest you clear this file first, and then enter the game again, it will write the latest error report

If you can't read well, you can send debug_log to me and I will try my best to help you view it :D

Dude If YOu Had Anything Like Discord, Facebook, Instagram etc if you had any of this then plz tell me
@mR_Sk@

Sebastian

Quote from: MRSK143 on May 21, 2021, 04:56 AMDude If YOu Had Anything Like Discord, Facebook, Instagram etc if you had any of this then plz tell me

Did you do what he asked you to do ?
If yes, then post here the error message, or the whole content if you don't know what's an error.
@Yyg is already trying to help you. Be cool and answer properly, don't try to spam him with dumb questions and requests.

MRSK143

Quote from: Yyg on May 21, 2021, 02:23 AM
Quote from: MRSK143 on May 20, 2021, 11:55 AMdude i changed that but it stuck on there

https://ibb.co/6DJ8K7n

now how can i fix that?
If you do not find any errors in the server console, it means that there is no problem with your server script. It is likely that there are some errors in the client script.

You can see the error log in %appdata%\VCMP\04beta\debuglog.txt, it will tell which scripts found what kind of errors.
Maybe this file contains content by default, I suggest you clear this file first, and then enter the game again, it will write the latest error report

If you can't read well, you can send debug_log to me and I will try my best to help you view it :D

Bro I Cant Fix The Errors Of and here the debulog file

https://drive.google.com/file/d/1FCX-hjgRBohQlgm8eX6XSvx5dC9ceICj/view?usp=sharing

now plz fix this
@mR_Sk@

Yyg

Quote from: MRSK143 on May 22, 2021, 03:12 AM
Quote from: Yyg on May 21, 2021, 02:23 AM
Quote from: MRSK143 on May 20, 2021, 11:55 AMdude i changed that but it stuck on there

https://ibb.co/6DJ8K7n

now how can i fix that?
If you do not find any errors in the server console, it means that there is no problem with your server script. It is likely that there are some errors in the client script.

You can see the error log in %appdata%\VCMP\04beta\debuglog.txt, it will tell which scripts found what kind of errors.
Maybe this file contains content by default, I suggest you clear this file first, and then enter the game again, it will write the latest error report

If you can't read well, you can send debug_log to me and I will try my best to help you view it :D

Bro I Cant Fix The Errors Of and here the debulog file

https://drive.google.com/file/d/1FCX-hjgRBohQlgm8eX6XSvx5dC9ceICj/view?usp=sharing

now plz fix this
If you read it carefully, it will tell you that the first character of the first line of the store/script/main.nut script is wrong, but based on experience this may be due to formatting issues, you can try checking the main.nut script
I don't use the computer very often, if there are more problems you can try to analyze the debug_log.txt and try how to handle it, good luck!

MRSK143

Quote from: Yyg on May 22, 2021, 01:40 PM
Quote from: MRSK143 on May 22, 2021, 03:12 AM
Quote from: Yyg on May 21, 2021, 02:23 AM
Quote from: MRSK143 on May 20, 2021, 11:55 AMdude i changed that but it stuck on there

https://ibb.co/6DJ8K7n

now how can i fix that?
If you do not find any errors in the server console, it means that there is no problem with your server script. It is likely that there are some errors in the client script.

You can see the error log in %appdata%\VCMP\04beta\debuglog.txt, it will tell which scripts found what kind of errors.
Maybe this file contains content by default, I suggest you clear this file first, and then enter the game again, it will write the latest error report

If you can't read well, you can send debug_log to me and I will try my best to help you view it :D

Bro I Cant Fix The Errors Of and here the debulog file

https://drive.google.com/file/d/1FCX-hjgRBohQlgm8eX6XSvx5dC9ceICj/view?usp=sharing

now plz fix this
If you read it carefully, it will tell you that the first character of the first line of the store/script/main.nut script is wrong, but based on experience this may be due to formatting issues, you can try checking the main.nut script
I don't use the computer very often, if there are more problems you can try to analyze the debug_log.txt and try how to handle it, good luck!

Bro I See Everything I cant see any thing that is not normal and plz try to help me i cant fix that
@mR_Sk@

MRSK143

Quote from: Yyg on May 22, 2021, 01:40 PM
Quote from: MRSK143 on May 22, 2021, 03:12 AM
Quote from: Yyg on May 21, 2021, 02:23 AM
Quote from: MRSK143 on May 20, 2021, 11:55 AMdude i changed that but it stuck on there

https://ibb.co/6DJ8K7n

now how can i fix that?
If you do not find any errors in the server console, it means that there is no problem with your server script. It is likely that there are some errors in the client script.

You can see the error log in %appdata%\VCMP\04beta\debuglog.txt, it will tell which scripts found what kind of errors.
Maybe this file contains content by default, I suggest you clear this file first, and then enter the game again, it will write the latest error report

If you can't read well, you can send debug_log to me and I will try my best to help you view it :D

Bro I Cant Fix The Errors Of and here the debulog file

https://drive.google.com/file/d/1FCX-hjgRBohQlgm8eX6XSvx5dC9ceICj/view?usp=sharing

now plz fix this
If you read it carefully, it will tell you that the first character of the first line of the store/script/main.nut script is wrong, but based on experience this may be due to formatting issues, you can try checking the main.nut script
I don't use the computer very often, if there are more problems you can try to analyze the debug_log.txt and try how to handle it, good luck!

I Cant Find Any Wrong Thing Bro And You Can GIve me a tutorial for adding the weapon plz help me!
@mR_Sk@

Yyg

About how to fill the modified armory, I can't remember it too long, please, by checking the script, you probably need to do the following:
Weapon ID change: store\script\main.nut(g_WEAPONPOOLS)
Remember to add a similar "Item Image" for store\sprites\GameMenu\CMenu_Backpack\WeaponItems (this may require you to modify the Image yourself)

You can analyze and refer to the content of this topic. I suggest you try to start the test with the default weapon (0~33) first. I think the main code is in store\script\main.nut(g_WEAPONPOOLS array)

MRSK143

Quote from: Yyg on May 24, 2021, 06:08 AMAbout how to fill the modified armory, I can't remember it too long, please, by checking the script, you probably need to do the following:
Weapon ID change: store\script\main.nut(g_WEAPONPOOLS)
Remember to add a similar "Item Image" for store\sprites\GameMenu\CMenu_Backpack\WeaponItems (this may require you to modify the Image yourself)

You can analyze and refer to the content of this topic. I suggest you try to start the test with the default weapon (0~33) first. I think the main code is in store\script\main.nut(g_WEAPONPOOLS array)

i can make that image but i also tried tooo many things and also what you said to try but still giving error that i send you picture what should i do now?
@mR_Sk@

MRSK143

Quote from: MRSK143 on May 24, 2021, 10:13 AM
Quote from: Yyg on May 24, 2021, 06:08 AMAbout how to fill the modified armory, I can't remember it too long, please, by checking the script, you probably need to do the following:
Weapon ID change: store\script\main.nut(g_WEAPONPOOLS)
Remember to add a similar "Item Image" for store\sprites\GameMenu\CMenu_Backpack\WeaponItems (this may require you to modify the Image yourself)

You can analyze and refer to the content of this topic. I suggest you try to start the test with the default weapon (0~33) first. I think the main code is in store\script\main.nut(g_WEAPONPOOLS array)

i can make that image but i also tried tooo many things and also what you said to try but still giving error that i send you picture what should i do now?

Bro You Can Add The Weapon Just Believe Me And Believe YourSelf Also You Can Add The WEapon Bro only you are the last one that can help me here the weapon link i want to add
 https://drive.google.com/file/d/1WdmVDJrqu5YkV-GOzGybBe_ZzfyMIJJn/view?usp=sharing
bro and make a video on it how can i add it plz
@mR_Sk@

Yyg

I tested the weapon modification on the local server, and I'll show you how I did it:

For example, I want to add a sniper rifle with ID=29 (which is not available by default in the current server version).
1. Open store\script\main.nut
2. Modify the g_WEAPONPOOLS array (keep the array count, replacing only the ID), e.g. 28 to 29
3. Open the store\sprites\Gamemenu\CMenu_Backpack\WeaponItems folder, add an image with the name 29.png

If there is no problem, then the Weapon should be added. Custom Weapon also operates the same way, but the ID may be more than 100+ (VCMP feature).

MRSK143

Quote from: Yyg on May 26, 2021, 01:58 AMI tested the weapon modification on the local server, and I'll show you how I did it:

For example, I want to add a sniper rifle with ID=29 (which is not available by default in the current server version).
1. Open store\script\main.nut
2. Modify the g_WEAPONPOOLS array (keep the array count, replacing only the ID), e.g. 28 to 29
3. Open the store\sprites\Gamemenu\CMenu_Backpack\WeaponItems folder, add an image with the name 29.png

If there is no problem, then the Weapon should be added. Custom Weapon also operates the same way, but the ID may be more than 100+ (VCMP feature).

If it is working right then why it is not working in my server bro its giving the same error bro plz help me
https://ibb.co/R6dhWnh
image link this the error that i am having when i modify gWEAPONSPOOL array
@mR_Sk@