[Release] StreetRaces Extension - MP Races w. Random Checkpoints, Off-Road/All Map

This is a very minor extension of Brent_Peterson’s fantastic resource StreetRaces, that I whipped up for my server, and thought I would share.

[StreetRacesRandomv1.1.zip|attachment] https://github.com/ddraigcymraeg/StreetRacesRandom

This extension simply adds the ability to add checkpoints anywhere on the map rather than only roads, including water, so off-road and boat racing is possible.
Once you create the checkpoints, you can set config_cl.randomCheckpoints = true in config.lua and the checkpoint order will be randomized at the start of every race. A long range blip has been added for the next checkpoint as well to help players find it.
Also added config_cl.snapToNearestRoad which when true snaps a checkpoint to the nearest road like the original resource.

Its basically meant to be a version of an SA:MP mod I made back in the day called Gumball Rally, where checkpoints are added across the whole map and every time the race is started, the order of the checkpoints changes. Releasing ‘as is’, and dont plan to ‘officially’ support this. Checkpoint cylinder heights are very large to accommodate long range races, as well to compensate for zcoord calculation weirdness in certain areas of the map, like Chiliad. You can change the height in config.lua, like the original mod. Some more work could be done to obtain proper zcoords when a player is within collision range (~300m), but I’m not too bother about it.

long range checkpoint blip help…


off road checkpoints and randomized order…

water racing…

preferred The Cannonball Run myself…

7 Likes

nice one mate ,a quick question.If i put this on normal script client
if config_cl.snapToNearestRoad == false then
coords = waypointCoords
end

and this entry on the config
snapToNearestRoad = false into config_cl array
and checkpoint height of course *
i will have the record everywhere checkpoint without the randomize checkpoints thing right?

Hi,
As far as recording, regardless of config_cl.randomCheckpoints = false or true, the order you recorded them will be saved to that sequence.

Yeah, you basically use ‘/race record’ like in the original resource to place the check points wherever you want. snapToNearestRoad = false means they will go anywhere you click on in the map, whereas when it is true, it will find the nearest vehicle node to place the checkpoint so it remains on a road, like the original mod. Regardless of the value, the checkpoints will be recorded in the order you placed them, like the original mod.
So you can play them in the order they were placed with config_cl.randomCheckpoints = false, or in randomized order when you start the race when it is set to true.

Basically the snap to road setting is only for when you are recording checkpoints to create a new race.

A fun race can be having motox bikes or atvs and finding the quickest way across the map to the next checkpoint. The original sa:mp mod had everyone on superbikes doing basically the same thing. Sort of different from a regular road race.

nice work

1 Like

is just for me that when i do record and start the race, even with config_cl.randomCheckpoints = false, the checkpoints start randomized everytime?

No its not just you, let me take a look and post a fix.

There was some old code left over in the client file I needed to clean up. Its working now.
StreetRacesRandomv1.1.zip (9.0 KB)

1 Like

Could you upload the resource to github?

here you go: https://github.com/ddraigcymraeg/StreetRacesRandom

1 Like

i am facing a issue the issue is when i use this script weather in my city fluctuate for eg weather start blinking and time automatically changes to day @ddraigcymraeg

looks for the line that says EXTRASUNNY, remove that section of code that deals with weather, namely forcing extra sunny. sorry that this ended up in the resource.

@ddraigcymraeg I made your extenstion available for vrp I hope it’s alright

For VRP
You can just replace the port_sv with this and it should work
It worked on my server with vrp
When the player wins the money gets into the bank as I hated they got it on hand
let me know if anything dosen’t work

port_sv.lua (2.4 KB)

1 Like