Quote:
Originally Posted by Ronas963
it can give weapon Valve rocket launcher like Robin Walker items?
|
Not specifically. However, you can create custom weapons with crazy attributes and decide if regular players can use !gimme to get the weapon, or if it requires an Admin to give the item to the player.
To do that simply create a text file in your /addons/sourcemod/configs/ directory called 'tf2items.givecustom.txt'
The plugin looks for this file whenever the plugin is loaded. That file should contain any custom items (weapons and cosmetics) that you want available in game. You can modify those items with whatever attributes you want.
Example
tf2items.givecustom.txt file:
PHP Code:
"custom_give_weapons_vlolz"
{
"40001" //Mann Co Hat with random unusual effect
{
"classname" "tf_wearable"
"index" "261"
"slot" "8"
"quality" "6"
"level" "29"
"attribs" "134 ; 999.0"
"ammo" "-1"
}
"50001" //Super Overpowered Warhawk Rocketlauncher Factory New
{
"classname" "tf_weapon_rocketlauncher"
"index" "15150"
"slot" "0"
"quality" "5"
"level" "9001"
"attribs" "134 ; 702.0 ; 2 ; 80.0 ; 6 ; 0.1 ; 4 ; 6.0 ; 57 ; 30.0 ; 318 ; 0.1 ; 851 ; 6.0 ; 326 ; 3.0 ; 99 ; 10 ; 1007 ; 1.0 ; 181 ; 2.0 ; 275 ; 1.0 ; 385 ; 82"
"ammo" "200"
}
}
In the above example there are two custom items, a hat and a rocketlauncher. The hat has an index number of 40001 and will look like index number 261 which is a Mann Co. Hat. The rocketlauncher has an index number of 50001 and will look like index number 15150 which is a Warhawk skinned rocketlauncher.
When creating items you should create item index numbers above 40000 to prevent conflicts with existing in-game item numbers. Item index numbers above 50000 require an Admin to use the command !giveitem <target> <item index number> to give the item to a player.
In our example above players can give themselves the hat because it has an item index number less than 50000. Players will not be able to give themselves the rocketlauncher because it has a number higher than 50000. To give the rocketlauncher to the player named Johnny an Admin would have to type: !giveitem johnny 50001
The rocketlauncher will be lost when the player dies or touches a locker unless the command !giveitemp johnny 50001 is used. In that case the player will keep the item until map end.
Players can give themselves the hat with the command !gimme 40001. The hat will be removed on death or touching a locker unless the player uses the command: !gimmep 40001 which will give the player the hat until map end.
Of course none of this will work unless you create the file named tf2items.givecustom.txt and put it in your /configs/ directory.
Public Safety Announcement: Use caution when creating custom weapons. They will very likely upset the balance of the game. For example, the rocketlauncher above has stats too extreme for public use (see attached image).