How to add custom stuff !
[howto] I/O functionality »

PsyChO_KiLLeR

  • Full Member
  • Learning from you All
  • Posts: 133

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 1,173
Re: ▌Video ▌How to add custom stuff !
« Reply #16, on February 28th, 2015, 09:02 AM »
This is why I added this:



And the function I used in /exec command was the one that put the weapon ID 100 in my hand.
Code: [Select]
/exec FindPlayer(0).SetWeapon(100,9999);
(now with 9999 ammo)

PsyChO_KiLLeR

  • Full Member
  • Learning from you All
  • Posts: 133

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 1,173
Re: ▌Video ▌How to add custom stuff !
« Reply #18, on February 28th, 2015, 09:18 AM »
Yep, it does include the sniper files - sniper.dff and sniper.txd
Do as you see in my video, and it will work.

Also, >here< is the .xml file I have used.

MacTavish

  • Hero Member
  • Nicks( Kusanagi, Beztone, RATHORE )
  • Posts: 812

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

PsyChO_KiLLeR

  • Full Member
  • Learning from you All
  • Posts: 133
Re: ▌Video ▌How to add custom stuff !
« Reply #20, on February 28th, 2015, 09:43 AM »
i cant understand i use mvl but it not give me option in vcmp
can you give one weapon link then i make next all with my self?

MacTavish

  • Hero Member
  • Nicks( Kusanagi, Beztone, RATHORE )
  • Posts: 812

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Fjose

  • Jr. Member
  • Programmer
  • Posts: 90
Re: ▌Video ▌How to add custom stuff !
« Reply #23, on May 28th, 2015, 09:50 PM »
(click to show/hide)
<?xml version="1.0" encoding="ASCII"?>
<weapon>
   <basic>
      <name>Sniper</name>
      <logicalid>28</logicalid>
   </basic>

   <properties>
      <type>instant_hit</type>
      <range>100.000000</range>
      <firerate>180</firerate>
      <reload>1401</reload>
      <clipsize>7</clipsize>
      <damage>125</damage>
      <speed>-1.000000</speed>
      <radius>-1.000000</radius>
      <lifespan>-1.000000</lifespan>
      <spread>-1.000000</spread>
      <offset>
         <x>0.000000</x>
         <y>0.660000</y>
         <z>0.050000</z>
      </offset>
      <animgroup>unarmed</animgroup>
      <animstart>2</animstart>
      <animend>8</animend>
      <animfire>3</animfire>
      <anim2start>0</anim2start>
      <anim2end>10</anim2end>
      <anim2fire>3</anim2fire>
      <animbreak>99</animbreak>
      <modelindex>286</modelindex>
      <model2index>-1</model2index>
      <flags>00000100</flags>
      <weaponslot>8</weaponslot>
   </properties>
</weapon>

Taking this example.
about animgroup, where I can find the names of each one? specifically the animagroup for the tec-9, and what are the flags?

Sebby, I would like know where you learned all this :), was reading the vc code? (gta3.img model)


Thijn

  • VC:MP Beta Tester
  • Posts: 1,687
Re: ▌Video ▌How to add custom stuff !
« Reply #24, on May 29th, 2015, 06:50 AM »
@Fjose: This was posted on the old unofficial squirrel forum. Hopefully you'll understand the syntax better now ;)



Create a new 7-Zip (7z) archive with a filename in this format:
w<id>_s<slot>_l<weapon>_name.7z

<id> - starting from 100 and increasing with each weapon you add; the ID used by the weapon in-game
<slot> - the weapon slot the weapon uses, with 0 being fist, 1 being melee, etc.
<weapon> - the ID of the weapon your custom weapon behaves like; putting 6 in here will make your weapon behave like a baseball bat

If <weapon> is 81, it will act as a hat, and the player will use fists for melee.

The contents of the file are as follows:

weaponname.xml
Describes the weapon and its settings, like in weapon.dat. logicalid is the same as the <weapon> specified in the filename. The following describes a pike used in the public beta server that acts as a baseball bat. If you are specifying a firearm, you will need to modify this.

Code: [Select]
<?xml version="1.0" encoding="ASCII"?>
<weapon>
<basic>
<name>Pike</name>
<logicalid>6</logicalid>
</basic>

<properties>
<type>melee</type>
<range>2.000000</range>
<firerate>450</firerate>
<reload>100</reload>
<clipsize>1000</clipsize>
<damage>21</damage>
<speed>-1.000000</speed>
<radius>0.800000</radius>
<lifespan>-1.000000</lifespan>
<spread>-1.000000</spread>
<offset>
<x>0.100000</x>
<y>1.800000</y>
<z>0.300000</z>
</offset>
<animgroup>baseball</animgroup>
<animstart>5</animstart>
<animend>20</animend>
<animfire>16</animfire>
<anim2start>3</anim2start>
<anim2end>17</anim2end>
<anim2fire>11</anim2fire>
<animbreak>99</animbreak>
<modelindex>-1</modelindex>
<model2index>-1</model2index>
<flags>00102000</flags>
<weaponslot>1</weaponslot>
</properties>
</weapon>

weaponname_icon.png (optional)
The icon for the weapon that will be used in-game. If not specified, a blank icon is used.

animgroup.ifp (optional)
The animation group file used for the weapon. If not given, the client will use the default animation group provided by Vice City.

weaponname.dff (optional)
The model for the weapon. If not given, the client will use the same model as the logical weapon ID, i.e. the baseball bat in this example.

weaponname.txd (optional)
The texture for the weapon. If not given, the client will use default textures for the logical weapon ID.

scope.png (optional)
For sniper rifles and RPGs; the texture used for the scope when zoomed in. If not given, the client will use default scopes.

Fjose

  • Jr. Member
  • Programmer
  • Posts: 90
Re: ▌Video ▌How to add custom stuff !
« Reply #25, on May 29th, 2015, 08:39 PM »Last edited on May 29th, 2015, 09:06 PM
thanks
Posted: May 29th, 2015, 08:33 PM
Quote from Thijn on May 29th, 2015, 06:50 AM
<weapon> - the ID of the weapon your custom weapon behaves like; putting 6 in here will make your weapon behave like a baseball bat
I was omitting/ignoring that detail xD, for that, I was confusing the things

For e.g the archive is called w100_s3_l24_SIngramCustom.7z, the id is 24 (Silenced Ingram), then I need modify the animgroup in the weaponname.xml to what?
 <animgroup>what I'll put?</animgroup>

MacTavish

  • Hero Member
  • Nicks( Kusanagi, Beztone, RATHORE )
  • Posts: 812
Re: ▌Video ▌How to add custom stuff !
« Reply #26, on May 30th, 2015, 01:58 PM »
Quote from Fjose on May 29th, 2015, 08:39 PM
thanks
Posted: May 29th, 2015, 08:33 PM
Quote from Thijn on May 29th, 2015, 06:50 AM
<weapon> - the ID of the weapon your custom weapon behaves like; putting 6 in here will make your weapon behave like a baseball bat
I was omitting/ignoring that detail xD, for that, I was confusing the things

For e.g the archive is called w100_s3_l24_SIngramCustom.7z, the id is 24 (Silenced Ingram), then I need modify the animgroup in the weaponname.xml to what?
 <animgroup>what I'll put?</animgroup>
Put Colt45 in animgroup

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Alecu Madalin

  • Jr. Member
  • Posts: 92

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 1,173