Thread: PunchShot 1.0
View Single Post
Author Message
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-09-2008 , 15:38   PunchShot 1.0
Reply With Quote #1

PunchShot
Version 1.0

Requirements:
  • Sourcemod 1.0.3
Description:
What this plugin does is allows you to preset the punch velocity/direction on a client when shot in a specific hitgroup. The default settings are configured to push the clients view towards the body part that has been shot. When shot in the head, your view is spun to represent dizziness. Every punch can be configured in punchdata.cfg. Have fun!

Todo:
(Strikethrough = Completed)
  • (none)
Config:
addons/sourcemod/configs/punchshot.cfg
Code:
// ====================
//     PunchShot
//   File: punchshot.cfg
//   Author: Greyscale
// ==================== 
//
// Here you can configure the punch velocity of each hitgroup
// Format
//
// "hitgroup" - Hitgroup ID goes here, each are labeled with the actual body part
//    "pitch" - Vertical push, positive pushes DOWN, negative pushes UP
//    "yaw" - Horizontal push, positive pushes LEFT, negative pushes RIGHT
//    "roll" - Twist, positive twist to the RIGHT, negative twists to the LEFT
//
// NOTE: Leaving the value blank ("") will not apply any force on that plane


"punchdata"
{
    "0" // generic (anything from explosions to falling)
    {
        "pitch"        ""
        "yaw"        ""
        "roll"        ""
    }

    "1" // head
    {
        "pitch"        ""
        "yaw"        "800.0"
        "roll"        ""
    }

    "2" // chest
    {
        "pitch"        "-10.0"
        "yaw"        ""
        "roll"        ""
    }

    "3" // stomach
    {
        "pitch"        "10.0"
        "yaw"        ""
        "roll"        ""
    }

    "4" // left arm
    {
        "pitch"        ""
        "yaw"        "13.0"
        "roll"        "-10.0"
    }

    "5" // right arm
    {
        "pitch"        ""
        "yaw"        "-13.0"
        "roll"        "10.0"
    }

    "6" // left leg
    {
        "pitch"        "10.0"
        "yaw"        "10.0"
        "roll"        "-15.0"
    }

    "7" // right leg
    {
        "pitch"        "10.0"
        "yaw"        "-10.0"
        "roll"        "15.0"
    }
}

Installation:
  • Download the .sp file (which should compile into a .smx file) and extract to sourcemod/plugins
  • Download the .cfg file and extract to <yourgamedir>/addons/sourcemod/configs, then configure your punch velocity data
  • Your done!
Changelog:

July 9th
  • Released
Attached Files
File Type: sp Get Plugin or Get Source (punchshot.sp - 2034 views - 3.1 KB)
File Type: cfg punchdata.cfg (1.2 KB, 944 views)
__________________

Last edited by Greyscale; 07-09-2008 at 17:42.
Greyscale is offline