Raised This Month: $32 Target: $400
 8% 

[CSS] Rally Race Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author
raydan
Senior Member
Join Date: Aug 2006
Plugin ID:
1295
Plugin Version:
1.0.0.5
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Drive HL2 vehicle in CSS to play rally race
    Old 11-25-2009 , 20:58   [CSS] Rally Race Mod
    Reply With Quote #1

    [IMG]http://img9.**************/img9/4986/cssbuggy.png[/IMG]
    Counter Strike:Source Rally Race Mod

    This is a CSS mod. Drive HL2 vehicle in CSS to play rally race. Support vehicle engine sound, car engine boost, 16 racer in a map, checkpoints, place.
    You can use the extension to make you own Race Mod
    That is possible to create a drivable vehicle in TF2, DODS, L4D1/2(use vehicle kill zombie)


    Current Version
    extension 1.0.0.1
    plugin 1.0.0.5

    Code:
    rallyrace_readytime - 20 - Ready Time
    rallyrace_racetime - 320 - Racers will force suicide to end current race round after this value (0 = disable)
    rallyrace_raceround - 6 - After how many race round start a map vote? (0 = disable)


    Newbie Install:
    1. Download newbie_pack_plugin.zip, unzip to "cstrike" folder
    2. Download "rallyrace.sp" & Compile the "rallyrace.sp"


    Manual Install:
    1. Download css_patch.zip, unzip to "cstrike" folder
    2. Go to "cstrike\scripts" folder, open "game_sounds_manifest.txt" file.
    Add the following code
    Code:
    "preload_file"  "scripts/game_sounds_vehicles.txt"
    then the file will become like this
    Code:
    game_sounds_manifest
    {
      "precache_file"   "scripts/game_sounds_hostages.txt"
      "precache_file"   "scripts/game_sounds_bots.txt"
     
      "preload_file"   "scripts/game_sounds.txt"
      "preload_file"   "scripts/game_sounds_physics.txt" 
      "preload_file"   "scripts/game_sounds_radio.txt"
      "preload_file"   "scripts/game_sounds_weapons.txt"
      "preload_file"  "scripts/game_sounds_ambient_generic.txt"
      "preload_file"  "scripts/game_sounds_world.txt"
      // Level sounds
      "preload_file"  "scripts/level_sounds_general.txt"
      "preload_file"  "scripts/game_sounds_vehicles.txt"
    }
    3. Download rallyrace_materials.zip, unzip to "cstrike" folder. If you are using sv_downloadurl, upload to your download server too
    4. Download rallyrace_plugin.zip, unzip to "cstrike\addons\sourcemod".
    5. Download "rallyrace.sp" & Compile the "rallyrace.sp"


    Race map:
    race_derby_v1.zip is a map file
    another 2 map files, http://www.sendspace.com/file/er7v8f
    You can create race map for this plugin
    There are 4 types special entity for this plugin, all are defined in rallyrace.sp:

    Check Point: car check points
    Classname: "trigger_multiple"
    Targetname: "checkpoint_#"+(1..)
    Wait (Delay before reset): 0.1 (best value is 0.1, don't set 0)
    for the first checkpoint, targetname must be "checkpoint_#1", second checkpoint, "checkpoint_#2". (up to checkpoint_#x , where x is the largest integer number in sourcemod, and don't make stupid things, like checkpoint_#-1, checkpoint_#a, checkpoint_## and so on, if server crash don't ask me)

    Ready Zone: when player inside the zone, mean player can play on next race round
    Classname: "trigger_multiple"
    Targetname: "ready_zone"
    Wait: 0.1 or default
    Create a "env_sprite", use model "zx2_car/go.vmt", put it into the "ready_zone" center, it will show a "GO!" picture

    Spectate Zone: when player inside the zone, switch player to spectate team directly
    Classname: "trigger_multiple"
    Targetname: "spectate_zone"
    Wait: 0.1 or default
    Create a "cycler", use model "models/gman.mdl", let player know there is a spectate zone (or some sexy model)

    Car Spawn Point: car spawn points
    Classname: "info_target"
    Targetname: "car_spawn"
    Angle: you must set the correct angle


    How to control my car:
    W = Forward
    S = Backward
    A = Left
    D = Right
    Space bar = Handbrake
    Shift = Boost


    Requirement:
    metamod source 1.7.1 +
    sourcemod 1.2 +
    sourcemod mapchooser.smx


    For plugin coding:
    server will crash if you remove a car that contain driver inside. You should kill or remove the driver first.
    hope you can read my code, because there are no comment (may be add back later)
    use "rallyrace.inc" to create plugin for this mod


    How to Add Car:
    support up to 100 cars, if you need more, open the "rallyrace.sp", change MAX_CAR value
    example to add tacoma car http://forums.alliedmods.net/showpos...3&postcount=57
    open configs/rallyrace/carconfig.txt
    Code:
    "RallyRaceCar"
    {
     "1"
     {
      "model"  "models/buggy.mdl"
      "script" "scripts/vehicles/ep1.txt"
      "skin_min" "0"
      "skin_max" "0"
     }
    "2"
     {
      "model"  "models/natalya/tacoma/tacoma.mdl"
      "script" "scripts/vehicles/tacoma.txt"
      "skin_min" "0"
      "skin_max" "7" // tacoma have 8 skins? i don't know (0...7)
     }
    }
    then open configs/rallyrace/download.txt, add any files you want add to download, if file end with ".mdl" will auto precache!


    Version:
    1.0.0.1
    Fix late join player
    Add some Cvars for config
    Add some code comment in .sp & .inc
    Add map vote
    Changed 2 forward prototype
    When race finish, all map entities will reset

    1.0.0.2
    Add remove idle weapon
    Remove team change message

    1.0.0.3
    Fix player team error

    1.0.0.4
    zip file not contain .sp file anymore
    Fix again, should work now

    1.0.0.5
    Add a forward OnPlayerFinishRace
    Add file configs/rallyrace/carconfig.txt
    Add file configs/rallyrace/download.txt


    .
    Attached Files
    File Type: zip css_patch.zip (4.1 KB, 4866 views)
    File Type: zip race_derby_v1.zip (779.5 KB, 4604 views)
    File Type: zip rallyrace_materials.zip (51.9 KB, 4066 views)
    File Type: zip rallyrace_source.zip (29.8 KB, 4474 views)
    File Type: zip newbie_pack_plugin.zip (189.4 KB, 6229 views)
    File Type: zip rallyrace_plugin.zip (132.5 KB, 5462 views)
    File Type: sp Get Plugin or Get Source (rallyrace.sp - 4736 views - 26.9 KB)

    Last edited by raydan; 03-02-2010 at 07:09.
    raydan is offline
    tigerox
    AlliedModders Donor
    Join Date: Oct 2008
    Location: Canada
    Old 11-25-2009 , 21:09   Re: [CSS] Rally Race Mod
    Reply With Quote #2

    Runs really nice.

    Great work. This has lots of modding potential: new models, maps, etc. One thing I needed to change was to restart the round once the race is over. This resets the map so glass, barrells, etc gets reset.

    RallyRace::MOD 69.162.97.22:27015
    tigerox is offline
    FrozenHaxor
    Senior Member
    Join Date: Jun 2009
    Location: Poland
    Old 11-25-2009 , 21:11   Re: [CSS] Rally Race Mod
    Reply With Quote #3

    Can you please write a small plugin to spawn car by Admin command (for example in position where Admin is looking). I mean car that only Admin is allowed to drive by using E on car like in HL2, or if its too hard to do, just drivable by everyone, it can also be something like "Admin is typing command, and car is spawning in his angle and he is instantly driving it" - I think it would be the simplest way

    I tried to do it myself, but my coding experience is not enough


    Also, it would be nice to parent a prop_dynamic with animated crouching player on the chair instead of nothing inside car


    Well, if its possible to do for you, you will get lots of +karma from me!
    FrozenHaxor is offline
    raydan
    Senior Member
    Join Date: Aug 2006
    Old 11-26-2009 , 03:50   Re: [CSS] Rally Race Mod
    Reply With Quote #4

    Quote:
    Originally Posted by tigerox View Post
    Runs really nice.

    Great work. This has lots of modding potential: new models, maps, etc. One thing I needed to change was to restart the round once the race is over. This resets the map so glass, barrells, etc gets reset.

    RallyRace::MOD 69.162.97.22:27015
    restart the round will make players respawn
    the reason why don't do that is
    "car spawn order is order by time of join ready zone"

    may be there are a signature to let all prop reset

    Last edited by raydan; 11-26-2009 at 04:02.
    raydan is offline
    raydan
    Senior Member
    Join Date: Aug 2006
    Old 11-26-2009 , 04:01   Re: [CSS] Rally Race Mod
    Reply With Quote #5

    Quote:
    Originally Posted by FrozenHaxor View Post
    Can you please write a small plugin to spawn car by Admin command (for example in position where Admin is looking). I mean car that only Admin is allowed to drive by using E on car like in HL2, or if its too hard to do, just drivable by everyone, it can also be something like "Admin is typing command, and car is spawning in his angle and he is instantly driving it" - I think it would be the simplest way

    I tried to do it myself, but my coding experience is not enough


    Also, it would be nice to parent a prop_dynamic with animated crouching player on the chair instead of nothing inside car


    Well, if its possible to do for you, you will get lots of +karma from me!
    i haven't create a forward like that "CanEnterVehicle", may be add into extension later

    if you look the .sp file, you can know how to spawn a working jeep
    if spawn a default jeep, driver is invisible(observer/death player can't view the driver, same as HL2DM - airboat). if you make player visible, you can see the player is "stand on the jeep and using a knife", so wired. Who can fix that?
    raydan is offline
    tigerox
    AlliedModders Donor
    Join Date: Oct 2008
    Location: Canada
    Old 11-26-2009 , 08:37   Re: [CSS] Rally Race Mod
    Reply With Quote #6

    I see what you are saying about the spawn order.

    It would be nice to reset the map objects. There must be another way.

    - A few notes -
    Bug:
    -The sound cuts out for a few seconds from time to time. A few players mentioned this.
    Comments:
    - It would be nice to keep the best lap time for each map. Gives you something to achive; player holding the best time on the map.
    - When a players joins during the race it should let them know they need to wait till the race is done.
    - Need a way to change the map, after x number of races or something.

    Thanks again for a great mod.

    Last edited by tigerox; 11-26-2009 at 13:41.
    tigerox is offline
    blodia
    Veteran Member
    Join Date: Sep 2009
    Location: UK
    Old 11-26-2009 , 18:40   Re: [CSS] Rally Race Mod
    Reply With Quote #7

    ... i was working on a vehicle mod aswell but through scripting only, almost had it finished. good work never the less.

    Last edited by blodia; 11-27-2009 at 14:43.
    blodia is offline
    FrozenHaxor
    Senior Member
    Join Date: Jun 2009
    Location: Poland
    Old 11-27-2009 , 00:09   Re: [CSS] Rally Race Mod
    Reply With Quote #8

    Quote:
    Originally Posted by raydan View Post
    i haven't create a forward like that "CanEnterVehicle", may be add into extension later

    if you look the .sp file, you can know how to spawn a working jeep
    if spawn a default jeep, driver is invisible(observer/death player can't view the driver, same as HL2DM - airboat). if you make player visible, you can see the player is "stand on the jeep and using a knife", so wired. Who can fix that?
    Well,
    PHP Code:
    public CreateJeep()
    {
        new 
    ent  CreateEntityByName("prop_vehicle_driveable");
        if(
    IsValidEntity(ent))
        {
            
    DispatchKeyValue(ent"vehiclescript""scripts/vehicles/ep1.txt");
            
    DispatchKeyValue(ent"model""models/buggy.mdl");
            
    DispatchKeyValue(ent"solid","6");
            
    DispatchKeyValue(ent"actionScale","1");
            
    DispatchKeyValue(ent"EnableGun","0");
            
    DispatchKeyValue(ent"ignorenormals","0");
            
    DispatchKeyValue(ent"fadescale","1");
            
    DispatchKeyValue(ent"fademindist","-1");
            
    DispatchKeyValue(ent"VehicleLocked","0");
            
    DispatchKeyValue(ent"screenspacefade","0");
            
    DispatchKeyValue(ent"spawnflags""256" );
            
    DispatchSpawn(ent);
            
    RCM_InitJeep(ent);
        }
        return 
    ent;

    This code will create a "usable" and working Jeep? Means I have to use natives from your's inc and extension all the ways to get a working Jeep? Or extension is just for other part of Rally Race?
    FrozenHaxor is offline
    raydan
    Senior Member
    Join Date: Aug 2006
    Old 11-27-2009 , 01:13   Re: [CSS] Rally Race Mod
    Reply With Quote #9

    use CreateJeep() then teleport it, you will get a working jeep
    raydan is offline
    mats
    Senior Member
    Join Date: Jan 2005
    Old 11-27-2009 , 08:55   Re: [CSS] Rally Race Mod
    Reply With Quote #10

    I have some problems, late joiner don't spam in the wait area also after the race has ended. they just stay dead. and it should force round end so the things in the map reload and the map change change after vote.

    And it would be nice if there is a high score saving and some help cause people don't know what to do

    And see people in the cars, and if the first one finish the should be only like 30seconds for the other racers and then the round should restart.

    my server ip: 82.197.223.125:27015
    __________________

    Last edited by mats; 11-27-2009 at 09:12.
    mats is offline
    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 10:06.


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