AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY]Gravity Gun(updated at 2012 12 09) (https://forums.alliedmods.net/showthread.php?t=137684)

javalia 09-08-2010 11:32

[ANY]Gravity Gun(updated at 2012 12 09)
 
6 Attachment(s)
<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



noodleboy347 09-08-2010 18:50

Re: [ANY]Gravity Gun
 
Says it requires the Counter Strike extension. Are you sure this is [ANY]?

javalia 09-09-2010 02:51

Re: [ANY]Gravity Gun
 
Quote:

Originally Posted by noodleboy347 (Post 1295140)
Says it requires the Counter Strike extension. Are you sure this is [ANY]?

thanks. i have updated it

javalia 09-09-2010 06:13

Re: [ANY]Gravity Gun(updated at 2010 9 9)
 
updated

CoLDxPaiiN 09-10-2010 09:37

Re: [ANY]Gravity Gun(updated at 2010 9 9)
 
Can i Run it On CS:S Server?
:O
You Wrote Its For "Any" Game Type..
But i wanna be sure.
:]

javalia 09-10-2010 16:11

Re: [ANY]Gravity Gun(updated at 2010 9 11)
 
updated

javalia 09-10-2010 16:13

Re: [ANY]Gravity Gun(updated at 2010 9 9)
 
Quote:

Originally Posted by CoLDxPaiiN (Post 1296367)
Can i Run it On CS:S Server?
:O
You Wrote Its For "Any" Game Type..
But i wanna be sure.
:]

this is [ANY]. u can sure.
in real, i have tested it in only css.
but it MUST work fine on other mods.
but to run this mod, at least sdkhooks should support that mod

javalia 09-11-2010 06:50

Re: [ANY]Gravity Gun(updated at 2010 9 11)
 
updated

Groger 09-11-2010 09:51

Re: [ANY]Gravity Gun(updated at 2010 9 11)
 
Wow, looks nice ^^

If you are still developing you could add a cvar that goes like this :

gravitygunmod_adminonlyflag "a"

Why? So I can use this for my donators :)

Good luck!

javalia 09-11-2010 14:23

Re: [ANY]Gravity Gun(updated at 2010 9 11)
 
Quote:

Originally Posted by Groger (Post 1297222)
Wow, looks nice ^^

If you are still developing you could add a cvar that goes like this :

gravitygunmod_adminonlyflag "a"

Why? So I can use this for my donators :)

Good luck!

well, i am thinking about some admin only cvar for my plugin.


All times are GMT -4. The time now is 09:08.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.