View Single Post
Author Message
javalia
Senior Member
Join Date: May 2009
Location: korea, republic of
Old 09-08-2010 , 11:32   [ANY]Gravity Gun(updated at 2012 12 09)
Reply With Quote #1

<Gravity Gun Mod>




Introdution

this plugin is simple : grab something!
Press right mouse button to grab.
Press left mouse button to shoot.
Press +use key and press +attack to enable/disable motion of held props
Press +use key and move mouse or press WASD key to rotate held props
Press +use and +speed together to reset angle of held prop
Press +reload key and press A or D to rotate held prop in z axis.
Press +reload key and press W or S to set ditance of held prop from player(press +speed if u want to move prop faster in this mode)



Requirements


this plugin needs the things listed below to work:
  • SDKHooks
  • VPhysics



Installation

to install this plugin
  • put the smx file in the sourcemod/plugins folder
to compile this plugin manually
  • put all sp files in the sourcemod/scripting folder
  • put all inc files in the sourcemod/scripting/include folder
  • compile.



Configuration

to configurate this plugin to your likes

  • to use auto generated cfg file
    • run the plugin once, then the cfg will be generated in the cfg/sourcemod folder
    • take a look at the options and change them to your preferences
    • the options you choose in the cfg will be loaded on every map change
  • cvarlist for this version
Code:
// This file was auto-generated by SourceMod (v1.3.4)
// ConVars for plugin "gravitygun.smx"


// 1 for enable 0 for disable
// -
// Default: "1"
gravitygunmod_blueteam_enable "1"

// disable grab/pull by mouse button
// -
// Default: "0"
gravitygunmod_disablemousecontrol "0"

// drag force
// -
// Default: "400"
gravitygunmod_dragforce "400"

// enable motion disale/enable to held object
// -
// Default: "1"
gravitygunmod_enablemotioncontrol "1"

// 1 for enable 0 for disable
// -
// Default: "1"
gravitygunmod_enablesound "1"

// grab distance for default
// -
// Default: "100.0"
gravitygunmod_grab_defaultdistance "100.0"

// grab delay
// -
// Default: "0.2"
gravitygunmod_grab_delay "0.2"

// grab distance max limit
// -
// Default: "1000.0"
gravitygunmod_grab_maxdistance "1000.0"

// grab distance min limit
// -
// Default: "100.0"
gravitygunmod_grab_mindistance "100.0"

// multiply grab force by this value
// -
// Default: "10"
gravitygunmod_grabforcemultiply "10"

// max distance to allow drag
// -
// Default: "600"
gravitygunmod_maxdragdistance "600"

// max distance to allow grab
// -
// Default: "200"
gravitygunmod_maxpickupdistance "200"

// max distance to allow pull
// -
// Default: "200"
gravitygunmod_maxpulldistance "200"

// pull delay
// -
// Default: "0.5"
gravitygunmod_pull_delay "0.5"

// pull force
// -
// Default: "1600"
gravitygunmod_pullforce "1600"

// 1 for enable 0 for disable
// -
// Default: "1"
gravitygunmod_redteam_enable "1"

// force players to hold speed button to use mouse button for gravity gun function
// -
// Default: "0"
gravitygunmod_strictmousecontrol "0"

// 0 = doesnt allow weapon switch when u holding some prop, \n1 = u can change
// weapon but held prop will auto released, \n2 = u can change weapon and u can keep // hold yo prop if changed weapon also has gravitygun function.
// -
// Default: "2"
gravitygunmod_WeaponSwitchRule "2"
to make this plugin to admin only
  • put GravityGun_AdminOnly.smx to plugins folder



Known Bugs & Limits Of the Mod

  • when u rotate held props by mouse movement, your screen will shake ugly. but it will not so terrible.



Special Thanks To

i want to say thanks to these guys
  • asherkin for made wonderful extension vphysics and powered my build mod
  • DJtsunami for made SDKHooks
  • FlaminSarge for code patch/test/help.



Change Log

all the date`s format is y/m/d
Code:
update at 2012 12 09(ver 1.1.5.138)
  • fixed plugin to work for latest updated games.
update at 2011 11 26(ver 1.1.4.137)
  • fixed wrong package file. meh.
update at 2011 11 26(ver 1.1.4.137)
  • added more tf2 support
  • added bug fixing codes for weapon switchs
  • added cvar gravitygunmod_WeaponSwitchRule
  • not making punt sound for tf2 building
  • only owner can grab tf2 building
  • changed directory of include files of plugin.
  • and some small code fix/changes.
  • credits for FlaminSarge for this update.
update at 2011 7 22(ver 1.0.3.135)
  • fixed cvar gravitygunmod_WeaponEnableGrab a bit
update at 2011 7 22(ver 1.0.3.134)
  • made gravitygun plugin to also grab and throw tf2`s building
  • added cvar gravitygunmod_WeaponEnableGrab
update at 2010 9 30(ver 1.0.0.118)
  • added function to enable/disable motion of held props
  • added cvar gravitygunmod_enablemotioncontrol
  • added addon plugin of gravitygunmod to support admin only use
  • now explosive props will explode when throwed by gravity gun
  • now gravitygun can grab ragdoll
  • this version should regenerate cfg file
update at 2010 9 13(ver 1.0.0.92)
  • improved gravity gun`s stability of held prop by using vphysics extension
update at 2010 9 11(ver 1.0.0.88)
  • fixed movement bug of rotate function
  • this version should regenerate cfg file
  • added cvar gravitygunmod_grab_mindistance
update at 2010 9 11(ver 1.0.0.86)
  • added angle rotation function of held prop
  • added distance control function of held prop
  • it`s version is just 82 to 86 but i have compiled it so many times to upgrade to this version.
  • this version should regenerate cfg file
  • added cvar gravitygunmod_grab_maxdistance and gravitygunmod_grab_defaultdistance
update at 2010 9 9(ver1.0.0.82)
  • fixed angle calculation bug of held object
update at 2010 9 9(ver 1.0.0.70)
  • removed unused include file cstrike.inc from sourcecode
  • this version should regenerate cfg file
update at 2010 9 9(ver 1.0.0.68)
  • alpha release
Attached Files
File Type: zip GravityGunMod(1.0.0.92).zip (32.9 KB, 808 views)
File Type: zip GravityGunMod(1.0.0.118).zip (40.6 KB, 873 views)
File Type: zip GravityGunMod(1.0.3.134).zip (43.3 KB, 523 views)
File Type: zip GravityGunMod(1.0.3.135).zip (43.4 KB, 574 views)
File Type: zip GravityGunMod(1.1.4.137).zip (47.9 KB, 730 views)
File Type: zip GravityGun(1.1.5.138).zip (47.4 KB, 1892 views)
__________________

Last edited by javalia; 12-08-2012 at 17:03. Reason: updated plugin
javalia is offline