AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] Rally Race (https://forums.alliedmods.net/showthread.php?t=262490)

NatalyaAF 05-05-2015 17:15

[CS:GO] Rally Race
 
2 Attachment(s)
http://www.lady-natalya.info/images/rally-race-csgo.png

Original Author: raydan


CS:GO Rally Race
This is a direct descendent of raydan's old Rally Race mod for CS:S. Credit goes to him for the original idea and much of the functionality of this plugin. Sometime in 2011 I unofficially took over developing the CS:S version, but now I have taken it and made a new CS:GO version.


Current Version
0.51 (10 May 2015)


Version Info
0.51
- Sounds now use EmitSoundAny
- Added countdown to race start
- Fixed Dodge Charger model

0.50
- Removed some depreciated hooks

0.49
- First version for CS:GO
- Headlights are +lookatweapon
- Compatibility for CS:S Cars
- Fixed UI elements for CS:GO


CVARS
rallyrace_version_csgo -- version number
car_horn_delay -- Delay between horn honks in seconds -- Defaults to 1.0
rallyrace_readytime -- Wait time between races in seconds -- Defaults to 20
rallyrace_racetime -- Maximum race time in seconds -- Defaults to 320
rallyrace_raceround -- Number of races before map vote -- Defaults to 6
rallyrace_use -- If 1 this lets players press +use (e) to exit the car -- Defaults to 1


Files
http://www.lady-natalya.info/downloa..._N-GO-0.51.zip

The above file contains a basic install.

What does a Rally Race server need?
- A compatible map
- A car model
- A script for the car
- The plugin and configs
- mapchooser.smx
Optional: sounds and custom surfaceproperty scripts

In the .zip above I include
- 5 cars
- Scripts for those cars and other cars not present
- Configs for RR
- 3 other plugins -- sm_downloader, rallyrace_times, and mapchooser.smx

sm_downloader and rallyrace_times are optional, but you probably want them. mapchooser is mandatory.


Maps
CS:GO Rally Race maps work exactly the same as the CS:S ones, except the spectate zone doesn't work right now. It is okay to add the spectate zone brush, in the future I may get it operational.

Here are some maps you can download and use right away:
http://csgo.gamebanana.com/maps/185645
http://csgo.gamebanana.com/maps/185647
http://csgo.gamebanana.com/maps/185586

The map needs a few things to work right, I'm just copying raydan's explanation as this stuff has not changed.

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


Cars
I use prop_vehicle_driveable. Most cars from the CS:S Rally Race will work, but you need to use appropriate flags in carconfig.txt

I'll explain the variables with this example:
PHP Code:

    "4"
    
{
        
"name"            "Dodge Charger"
            "type"            "charger"
        "model"            "models/natalya/vehicles/dodge_charger_1969.mdl"
        "script"            "scripts/vehicles/69chargersticky.txt"
            "val_1"            "10"
            "val_2"            "1"
        "skin_min"        "0"
        "skin_max"        "9"
        "0"                "Black"
        "1"                "White"
        "2"                "Red"
        "3"                "Orange"
        "4"                "Yellow"
        "5"                "Dark Green"
        "6"                "Blue"
        "7"                "Purple"
        "8"                "Pink"
        "9"                "Bright Blue"
        "vip"                "0"
        "siren"            "0"
        "police_lights"        "0"
        "lights"            "2"
        "view"            "1"
        "driver"            "1"
    


name - car name as it will be displayed
type - unused right now
model - path to the .mdl
script - path to the vehicle script (determines handling of the car)
val_1 - unused right now
val_2 - unused right now
skin_min - should be 0
skin_max - maximum skin number, this is indexed so if the car has 10 skins you put 9 here
"0" - name for the colour or whatever of the skin of this number
"1" - name for the next colour etc
"vip" - leave this 0 unless you want only server admins or vips to use this car
(to make someone a VIP add them to the admin config file, but give immunity 0 and no flags)
siren - does this car have a police siren? use 0 for most cars
police_lights - if the car has attachments for flashing police lights set this to 1
lights - 1 means brake lights only, 2 means headlights also, these are determined by the model
view - does this model have an attachment for 3rd person? if so use 1
driver - is using a CS:S car set to 0 or else server can crash

driver, view, lights, and police_lights are all dependent upon the vehicle model. If it doesn't have the right stuff set them to 0. driver MUST be set to 0 for all vehicles except the dodge charger in the above .zip file because I have not made any other car work with a driver view model for CS:GO. Even if the view model worked for CS:S rally race it won't work now, so keep it 0. Look at the charger .mdl in HLMV to see the attachments.

If you want to model a car and give it functionality use the following attachment names:

Brakes:
light_rr
light_rl
Headlights:
light_fr
light_fl
Police Lights:
light_bar1
light_bar2
3rd Person:
vehicle_3rd <-- this one floats behind the vehicle up in the air
View Model:
vehicle_driver_eyes <-- for driver view model, but this REQUIRES a skeleton rigged properly

Talk to me on Steam (natalyaaf or natalya_fs) if you want to make a compatible car model I can explain everything in detail.


Other Notes
@ SM Mods:
If there are problems with this submission, I apologize, I can fix stuff or whatever if need be.

@ Everyone else:
Thanks for downloading, I hope you have fun racing on CS:GO

skinheadxtreme 05-05-2015 18:03

Re: [CS:GO] Rally Race
 
You should add the file in another way can't download it like that :)

NatalyaAF 05-06-2015 01:34

Re: [CS:GO] Rally Race
 
There is a link to a .zip in OP... it has everything in it to do a basic server... did you not see it?

Sprilo 05-06-2015 02:46

Re: [CS:GO] Rally Race
 
I've installed all the contents from the zip correctly but the server seems to crash when I stand in the "GO" area on race_the_marbles & race_space_view_csgo. For race_8-track_csgo I cannot even get to spawn in without the server crashing. No error logs are present.
Spoiler


Anyone else getting this problem? (Windows)

aexi0n 05-06-2015 11:00

Re: [CS:GO] Rally Race
 
Same problem as the above post^, however I am able to spawn on race_8-track_csgo after fixing some entities in hammer, but then it crashes when I stand in the GO area like the other maps.

EDIT: Also, I when I opened race_8-track_csgo in hammer, it did not have the described "GO! picture", so that could be the problem, but I don't really know enough about mapping to provide anymore insight there.

NatalyaAF 05-06-2015 12:16

Re: [CS:GO] Rally Race
 
1 Attachment(s)
First, thanks for looking at this you guys. Add me on Steam, I want to help debug this.
http://steamcommunity.com/id/natalyaaf/

Regarding race_8-track_csgo:
The GO! that should appear... I used pakrat to pak the content into the map. I opened it up in pakrat again just now and I see the two files:

materials/zx2_car/go.vmt
materials/zx2_car/go.vtf

@aexion:
You will need to extract those from the map and put them into csgo/materials/zx2_car to see them in Hammer. This will require a Hammer restart.
Also, what entities did you fix in Hammer for that map?

@Everyone:
Based on what y'all said, I attached a debug version of the plugin to this post. Try running this. It should spam some stuff in game right when the crash happens. It should also print to log a bunch of shit like this:

PHP Code:

L 05/06/2015 12:14:19: [rallyrace.smx] [RR Debug00
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug01
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug02
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug03
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug04
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug05
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug06
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 A
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 B
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 1
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 1 A
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 1 B
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 1 C Car Spawned Successfully for client 1
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 2
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 3
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 4
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 5
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 6
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 7
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 8
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 9
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 10
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 11
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 12
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 13
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 14
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 15
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 16
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 17
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 18
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 19
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 20
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 21
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 22
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 23
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 24
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 25
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 26
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 27
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 28
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 29
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 30
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 31
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 32
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 33
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 34
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 35
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 36
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 37
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 38
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 39
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 40
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 41
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 42
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 43
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 44
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 45
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 46
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 47
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 48
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 49
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 50
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 51
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 52
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 53
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 54
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 55
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 56
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 57
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 58
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 59
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 60
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 61
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 62
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 63
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug07 C 64
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug08
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug09
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug10
L 05
/06/2015 12:14:19: [rallyrace.smx] [RR Debug11 

If it doesn't get to [RR Debug] 11 at the very end then we know where it failed.

Sprilo 05-06-2015 13:12

Re: [CS:GO] Rally Race
 
I tried the map again and i can spawn in this time, not sure why I couldn't before.
Anyways, all 3 maps same results
Spoiler

lay295 05-06-2015 15:11

Re: [CS:GO] Rally Race
 
Hey I tried to get this working but it crashes when I try to join T side. I compiled the debug version you linked but oddly enough it doesn't print out anything to the log or console. It's on a windows server.

I added you on steam, add me back if you can :)
http://steamcommunity.com/id/Meow29/

crackworld 05-06-2015 15:37

Re: [CS:GO] Rally Race
 
I'm testing the mod, now I tell u! : D

NatalyaAF 05-06-2015 15:54

Re: [CS:GO] Rally Race
 
1 Attachment(s)
Okay the crash is occurring sometime when the car is spawning.

I got another debug setup, maybe this one can find exactly what about spawning the car will crash the server.


All times are GMT -4. The time now is 14:05.

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