[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
.