Raised This Month: $51 Target: $400
 12% 

[CSS/HL2DM] Vehicle Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Plugin ID:
1872
Plugin Version:
0.6
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Lets you drive vehicles
    Unapprover:
    Reason for Unapproving:
    Unapproval requested by blodia, plugin no longer supported by him.
    Old 08-11-2010 , 17:22   [CSS/HL2DM] Vehicle Mod
    Reply With Quote #1

    Requires SourceMod 1.4 or later and SDK Hooks

    Description
    Please read the whole post. if you can't be bothered to read the post, i can't be bothered to help you.

    Lets you drive land/water vehicles like in the hl2 games.

    Linux Crashes
    Thanks to daftmink for mentioning a patched vphysics.so here which should fix crashes, thanks to the author of the patch aswell. you will have to replace it after updates as the original is restored. i have mentioned it to valve devs on the steam forums a couple of times but nothing has been done about it ...

    if you have a steam forum account leave a post here maybe valve will do something if enough people complain.

    Server Command
    -- vehiclemod_spawnatuserid <userid> <vehicle name> <skin>[optional]

    this command spawns a vehicle where the player is standing and forces them inside. you can grab a players userid by typing "status" in your console.
    e.g vehiclemod_spawnatuserid 2 buggy 0

    -- vehiclemod_spawnatcoords <x coord> <y coord> <z coord> <yaw angle> <vehicle name> <skin>[optional]

    this spawns a vehicle at the given coords facing the given angle.
    e.g vehiclemod_spawnatcoords 100.0 200.0 50.0 90.0 airboat

    -- airboat and buggy are included in the zip file.

    -- for both commands the vehicle name parameter is the name you store in the vehiclelist.cfg file which is located in cfg folder inside your gamefolder.

    -- for both commands the skin parameter is for vehicles with multiple skins and is an integer. if your vehicle has 2 skins then you would access them with values of 0 or 1. the buggy and airboat don't have any extra skins.

    -- you can use these command inside your own plugins or cfg files.

    ConVars
    vehiclemod_breakable -- min 0 max 1 --whether or not the vehicles can be destroyed (default 0).
    vehiclemod_health -- min 1 max 10000 health of the vehicle when they are destroyable (default 200).
    vehiclemod_autolock -- min 0 max 1 -- blocks player exiting once they enter (default 0).
    vehiclemod_damagedriver -- min 0 max 1 -- lets the driver take damage while in the vehicle. crashing the vehicle into things damages the player if they're going fast, only area effect entities can damage players e.g explosions, triggers etc (default 1).
    vehiclemod_gun_enable -- min 0 max 1 -- 0 disables vehicle guns 1 enables vehicle guns (default 0).
    vehiclemod_gun_mindamage -- min 1 max 1000000 -- minimum damage the gun does (default 5).
    vehiclemod_gun_maxdamage -- min 1 max 1000000 -- maximum damage the gun does (default 10).
    vehiclemod_gun_rof -- min 0.01 max 100 -- the guns rate of fire, delays between shots in seconds (default 0.2).

    Guns
    Write the gun coordinates in the cfg file(see the buggy/airboat for example). these coordinates are relative to the vehicle origin, if you're unsure what values to use try the jeep/airboat values and tweak them until the gun is where you want it to be. the min and max damage cvars are linked so you can't have a lower value for max damage than min damage or higher value for min damage than max damage, the damage is chosen at random between those 2 values.

    Installation
    Place the compiled plugin in your sourcemod plugins folder and vehiclelist.cfg inside your cfg folder within the root game folder (not inside the sourcemod folder). place the files inside the zip file linked at bottom of this post into their relative folders.

    Getting Sounds To Work
    Go to your scripts folder within you game folder and open "game_sounds_manifest.txt" and add the line

    Code:
    "preload_file"  "scripts/game_sounds_vehicles.txt"
    inside the curly brackets. take note that the file will most likely be overwritten when your game updates so be prepared to add it again if it does.

    Notes
    -- I have little time because of work and other responsibilities so please be patient.
    -- Vehicles with enter hitboxes will not allow players to auto enter on spawn, the vehicle will land on top of them hurting or killing them.
    -- At the moment when a player exits a vehicle their weapon viewmodel will be invisible, still looking for a way to fix it.
    -- Players exit vehicle at different places depending on if they're blocked. this is the order off the exit points relative to the vehicle: left, right, front, back then top, if they're all blocked players can't exit at all.
    -- Anti flip isn't 100% accurate.
    -- If you kill an enemy by crushing them against an entity you won't be rewarded the kill because it counts as world damage. The same goes for team killing.
    -- Vehicle crosshair isn't 100% accurate thanks to client side view smoothing.

    Changelog

    0.6 beta
    -- Please re download all files including the cfg and vehicle files.
    -- Added guns and related cvars, see above.
    -- Fixed gun viewmodel not showing on vehicle exit.
    -- Partial fix for laggy view.
    -- Fix for vehicle controlling all player view (untested).
    -- Changed the cfg file to accomodate guns, also added a section for the number of skins the model, if you don't choose a skin when spawning a vehicle a random one will be chosen.

    0.5 beta
    -- Please re download all files including the cfg and vehicle files.
    -- Switched back to prop_vehicle_driveable from prop_vehicle, unfortunately this means laggy view.
    -- Tried to fix vehicles controlling players views at earliest possible time (Untested).
    -- Added some code i hope will make the vehicle work in tf2/dods this time round (Untested).
    -- Added a new cvar for allowing players to take damage while in vehicle.
    -- Added the airboat and added a new key in the vehicle database for land/water vehicle type.
    -- Fixed bug with players leaving the server when they were in a vehicle.
    -- All vehicles in the cfg are precached at map start
    -- Made the skin parameter on the vehicle spawn commands optional.
    -- Players can no longer destroy vehicles their team mates are in.
    -- Fixed players not spawning in the correct place at round start if they were in a vehicle last round.
    -- Players get rewarded kills for running over other players instead of them counting as a suicide.

    0.4 beta

    -- Switched from prop_vehicle_driveable to prop_vehicle and added my own control code.
    -- No need for virtual offsets.
    -- Should work in all games this time round.
    -- Added anti flip code so vehicle should never flip upside down.
    -- No laggy view or vehicle controlling all players views.
    -- Added a check to make sure the spawn coordinates are clear.

    0.3 beta
    -- Added custom vehicle support, check out the revised server command.
    -- Added vehicle database to zip containing gamedata.
    -- Added new server command for spawning vehicles at coords instead of in front of players.

    0.2 beta
    -- Added cvars to make vehicles destroyable and set their health.
    -- Added cvar to autolock vehicles once players enter. this is for anyone who wants to make a race mod.
    -- Added a work around for vehicles controlling all players views when someone enters it.
    -- Added a temporary fix for the laggy view. thanks to rcarm.
    -- Modified the vehicle script with orangebox features so it should work in all games, please redownload the file. thanks to rcarm.
    -- Added zombie master to gamedata and put the file in a separate zip file.

    0.1 beta
    -- Initial release.

    link to vehicle files here. thanks to knifelemon.
    Attached Files
    File Type: cfg vehiclelist.cfg (688 Bytes, 1448 views)
    File Type: sp Get Plugin or Get Source (vehiclemod.sp - 1744 views - 36.1 KB)
    File Type: smx vehiclemod.smx (19.7 KB, 1341 views)
    File Type: zip AzuiSleet-vphysics_oct.zip (907.1 KB, 1064 views)

    Last edited by blodia; 01-15-2014 at 13:52.
    blodia is offline
    kossolax
    AlliedModders Donor
    Join Date: Jan 2008
    Location: Belgium
    Old 08-11-2010 , 17:48   Re: Vehicle Mod
    Reply With Quote #2

    good job
    kossolax is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 08-11-2010 , 17:54   Re: Vehicle Mod
    Reply With Quote #3

    mmmwwwhahaha awesome, can you run over a player and kill them?

    I'll try this today thanks. (any idea about lag factors?)
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    Searcher64
    Senior Member
    Join Date: Apr 2010
    Old 08-11-2010 , 18:15   Re: Vehicle Mod
    Reply With Quote #4

    I don't get this.....you drive players? What vehicles are there to drive? How can you drive any vehicles in L4D2 when you can't drive anything? How do you know what model it is? Do you drive players like puppet mod? Or do you control players? Do you just LOOK like you're driving, when there's no model?


    :S Not enough information
    Searcher64 is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 08-11-2010 , 19:26   Re: [ANY] Vehicle Mod
    Reply With Quote #5

    Searcher maybe download the zip and look inside as the required models etc are included
    Quote:

    Lets you drive vehicles
    Quote:
    :S Not enough information
    :S Not Enough Initiative
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    Searcher64
    Senior Member
    Join Date: Apr 2010
    Old 08-11-2010 , 19:33   Re: [ANY] Vehicle Mod
    Reply With Quote #6

    If it's that then how is this supposed to work for L4D2 if you can't upload files to users from host? :S
    Searcher64 is offline
    rcarm
    Member
    Join Date: Feb 2010
    Old 08-11-2010 , 19:35   Re: [ANY] Vehicle Mod
    Reply With Quote #7

    Quote:
    Originally Posted by Searcher64 View Post
    If it's that then how is this supposed to work for L4D2 if you can't upload files to users from host? :S
    The buggy model comes with every source engine game AFAIK, so they don't have to download anything.
    rcarm is offline
    GoldRenamon
    Guest
    Old 08-11-2010 , 19:38   Re: [ANY] Vehicle Mod
    Reply With Quote #8

    I can't figure out how to drive it, I just spawn it.

    EDIT: Figured out I have to bind +use, but when I'm sitting in the car, it won't move at all. D:


    Running TF2 btw.

    Last edited by GoldRenamon; 08-11-2010 at 19:46.
    Searcher64
    Senior Member
    Join Date: Apr 2010
    Old 08-11-2010 , 19:42   Re: [ANY] Vehicle Mod
    Reply With Quote #9

    So...you use the one command in the first post to spawn it at that player's position? Or does it do something else
    Searcher64 is offline
    GoldRenamon
    Guest
    Old 08-11-2010 , 19:59   Re: [ANY] Vehicle Mod
    Reply With Quote #10

    Quote:
    Originally Posted by Searcher64 View Post
    So...you use the one command in the first post to spawn it at that player's position? Or does it do something else

    Yeah, as far as I know it just spawns it at the player's position.
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 06:50.


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