How can I make a "racing" gamemode? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can I make a "racing" gamemode? (
/showthread.php?tid=603744)
How can I make a "racing" gamemode? -
Lucario448 - 27.03.2016
Hello there. I'm new on this; however, I've already know the basics of the programming language.
The thing is: how can I get started in creating a "racing" gamemode? Not from scratch if possible; instead, based on how Grand Larceny gamemode handles incoming players.
This is what I have in mind right now:
- I want to create a 20-players-maximum-race that borders all the San Andreas map. When a player enters to the server, it can choose the skin (character); and then spawn at some point in the East beach of Los Santos (the starting point of the race). No money or weapons the player will receive at first, and no vehicle should exist in the entire world (at first of course).
- When all players are ready; then an administrator types a server command, passes a certain amount of time (announcing to all players that the race will start soon), a countdown begins; and when that countdown finishes, 20 vehicles spawn in a row and the race finally starts.
- The race is made of checkpoints (almost exactly like how a race works in the normal game), and the vehicles must be indestructibles (if sunk in the water, then the vehicle teleports to the previously reached checkpoint).
- The first player who reaches the final checkpoint (aka finish line), will receive a prize that I'll decide later.
- If everybody wants to race again, then an administrator types the command; and this time, all players get teleported to their respective spawn locations (where they did that at first). The following events are the same as described above.
Now there are two things that I'm missing: the checkpoints' coordinates (I'll take care of this part), and what to do if the vehicle (a car) rollovers and sets on fire, because I still have no idea how to manage the disqualifications in a race.
Hope you could understand me since this is my very first post, and I will appreciate any help/idea/suggestion about how to get started.
Best regards.
Re: How can I make a "racing" gamemode? -
SickAttack - 27.03.2016
"how to get started"
- Download the SA-MP server package.
- Extract the package.
- Enter the folder the package is in if you aren't already in it.
- Open the file "server.cfg".
- Change "rcon_password" to any password you want.
- Remove the line of "filterscripts".
- Change the text after "gamemode0" to "racing".
- Go back to the main directory. Double click on the folder called "pawno" and execute pawno.exe.
- Inside the folder called "pawno", look for "new.pwn". Highlight it, press CTRL + C. Go to the main directory, go inside the folder called "gamemodes" and press CTRL + V.
- Change the name of the file you just pasted inside the folder "gamemodes" to "racing.pwn".
- Go back to the window that shows the IDE (pawno.exe) and click on open file.
- Find "racing.pwn" and open it.
- Now start scripting your racing gamemode!
- And when you want to compile and test out your awesome server press F5!
- Run "samp-server.exe" to start the server.
- Open the SA-MP client and click on add a new server.
- Type "localhost" and press ENTER.
- Connect to your server and have fun!
You have now officially started creating your racing gamemode. Congratulations!
And by the way, the things you are asking tips/ideas/suggestions/etc. on can't just be explained with words whatsoever. This section is for "help on your coding". Requests go here:
https://sampforum.blast.hk/showthread.php?tid=447813
Re: How can I make a "racing" gamemode? -
Lucario448 - 27.03.2016
Whoops. Anyway, it's my first time, so making any sort of mistake is something that I should expect.
All right, thank you for correcting me!