View Single Post
NatalyaAF
Senior Member
Join Date: Dec 2008
Old 12-06-2009 , 20:39   Re: [CSS] Rally Race Mod
Reply With Quote #57

Quote:
Originally Posted by raydan View Post
NatalyaAF: all vechicle model should use correct vechicle script, if use your Tacoma model, and still using ep1.txt, the buggy will bug


And garrymod is using ob engine, there are extra vechicle setting in vechicle script, like throttleSteeringRestRateFactor, boostSteeringRestRateFactor. The vechicle code between EP1 & OB engine are big different, see hl2sdk code

In garrymod, you can drive the vechicle very high speed without any problem. But in ep1 or this mod, if speed > ~70, you are very hard to control the vechicle (turn left/right), anyone know can fix it?
Sorry I forgot to mention that I gave it a custom vehicle script. (In the .zip file.) It works in game 100%. I wouldn't have put it up here if it did not.





Quote:
Originally Posted by karatel View Post
possible to replace the standard model buggy to another if you can Explain how plz
You can use the truck I have if u want. I'll give a walk-through for the truck, but any other vehicle will use basically the same steps...

Step 1: Install the Model
First, download it and extract everything to your server. You should end up with tacoma.txt in cstrike/scripts/vehicles and the model in cstrike/models/natalya/tacoma and the textures in cstrike/materials/models/natalya/vehicles if everything went proper. That's half the install right there.

Step 2: Edit the .sp File
Okay, go into the rallyrace.sp file that you compiled when you installed Rally Race Mod. (You can open it with notepad or whatever.) Scroll down until u see this:
Code:
public Action:RCM_IsPassengerVisible(car, nRole, &bool:visible)
2 lines below switch true to false so you have this:
Code:
visible = false; // make driver visible
You do that because it will look stupid if u can see the driver for my truck. If you use an open-topped vehicle, (like a convertible) then don't do it.

Next, scroll down again until you find this around line 765 (near the bottom):
Code:
public CreateJeep()
Soon after you will see the following two lines:
Code:
        DispatchKeyValue(ent, "vehiclescript", "scripts/vehicles/ep1.txt");
        DispatchKeyValue(ent, "model", "models/buggy.mdl");
Change them to match the model you are using. I will use the Tacoma as an example:
Code:
        DispatchKeyValue(ent, "vehiclescript", "scripts/vehicles/tacoma.txt");
        DispatchKeyValue(ent, "model", "models/natalya/tacoma/tacoma.mdl");
At this point you have to get the plugin to make players download the model and its texture files from your server. This is fairly simple as it already does a lot of that for you. Scroll back up towards the top of the plugin until you see this:
Code:
public OnMapStart()
Below you will see the PrecacheModel command. Change it to this:
Code:
    PrecacheModel("models/natalya/tacoma/tacoma.mdl",true);
Then you must edit the plugin to force players to download stuff. You will see a bunch of lines right here that look like this:
Code:
AddFileToDownloadsTable("materials/zx2_car/go.vtf");
You're just going to add the ones for your car model after this. If you use the toyota tacoma just paste the following after that line I just highlighted. Here is what you will paste into here:
Code:
    AddFileToDownloadsTable("models/natalya/tacoma/tacoma.dx80.vtx");
    AddFileToDownloadsTable("models/natalya/tacoma/tacoma.dx90.vtx"); 			 		
    AddFileToDownloadsTable("models/natalya/tacoma/tacoma.mdl"); 			 		
    AddFileToDownloadsTable("models/natalya/tacoma/tacoma.phy"); 			 		
    AddFileToDownloadsTable("models/natalya/tacoma/tacoma.sw.vtx"); 			 		
    AddFileToDownloadsTable("models/natalya/tacoma/tacoma.vvd"); 			 		
    
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacombr.vmt"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacombr.vtf"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomns.vmt"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomns.vtf"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomsk.vmt"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomsk.vtf"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomwd.vmt"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomwd.vtf"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomwh.vmt"); 			 		
    AddFileToDownloadsTable("materials/models/natalya/vehicles/tacomwh.vtf");
This model has 8 skins in all but we aren't forcing players to download the other 7 since Rally Mod currently has no support for that. You are now done editing the .sp file.


Step 3:
Compile your edited rallyrace.sp just like you did when you originally installed Rally Race Mod. Take the compiled rallyrace.smx and put it into your sourcemod/plugins folder. Restart the server and you should be set. ;) If you want to do it with another vehicle, just copy the steps I listed here.

Last edited by NatalyaAF; 12-07-2009 at 16:21.
NatalyaAF is offline