[FilterScript] [FS] Yagu's Race filterscript [v0.4a - Aug 5th]
#21

v0.4 update:
-Added menus for setting most of race specific settings: /buildmenu & /raceadmin. /loadrace [race] also pops open a menu.
-Complete overhaul on the prizes system
-Winner gets 3/6ths of the pot, second 2/6ths and the 3rd 1/6th.
-Different prize systems:
- Fixed: Prize money is a set sum
- Dynamic: Prize money is 1$ per 1m of whole race\'s lenght (ie. drive 20km, prize will be 20,000$)
- Entry fee: All racers have to pay a set sum of money, the entry fees are shared among the top 3.
- Entry fee + Fixed: All racers pay to join the race, prize: the fees + fixed sum of money
- Entry fee + Dynamic: All racers pay to join the race, prize: the fees + dynamic sum (1$ for 1m)
-Added a race rotation system that switches between races automatically
-Fixed a minor bug with setting /racemode 2 in race builder, thanks to Rush_iam for the report.
-Prevented giving negative values to various commands, and added few missing feedbacks


The menu system should make the script a lot nicer to use, the commands that used to be in the script still work, but I\'m intending to remove them in the next version unless some good reason to keep them pops up. SAMP as far as I understand has 128 menu limit, and this script uses 11, so there might be a possibility of some odd behaviour if the other scripts eat lot of the slots. The menusystem can be disabled by commenting one line from the source however, but not all things you can do from the menus can be done via commands. I\'d appreciate feedback on how the menus work for you, and what changes to them you\'d like to see.

edit: Re-uploded the source to pastebin since it apparently got messed up, should work now. Updated it with new /racehelp and /buildhelp too, since I forgot that at first :P

edit: Trying to use Race Rotation without yrace.rr placed in your scriptfiles might also cause some unwanted effects (like crashing)
edit2: Reuploaded the source to pastebin again, fixed the missing yrace.rr bug, it will now notify you about it in the server console :P
Reply
#22

Nice update
I\'ll update now

On the source on pastebin, theres 4 errors that come up in the compiler. To fix them, delete the ; from line 728.
Reply
#23

Holy!

Thats some nice update there, uploading now =]

Thanks
Reply
#24

now its cool
thx Yagu

I hope you will do system like MTA. When you enter some checkpoint it will set other vehicle :P e.g. cars+ships+planes in one race

edit: and should be when you have fee you can give more cash or who starts race can set entry min. fee. Many people want race for big cash :P
Reply
#25

your race script was very good before
now its amazing !!
thank you for great work
Reply
#26

Quote:
Originally Posted by Zauxit
I hope you will do system like MTA. When you enter some checkpoint it will set other vehicle :P e.g. cars+ships+planes in one race
Don\'t think this is possible, due to the vehicle model and vehicle limits in general in SA:MP, it would be pretty hazardous to create multiple different kinds of vehicles within the filterscript. Would be a bit diffeent case if this was a gamemode... (and it would require a whole lot of reworking on the race fileformat, too :P)

Quote:
Originally Posted by Zauxit
edit: and should be when you have fee you can give more cash or who starts race can set entry min. fee. Many people want race for big cash :P
Umh. This kinda is in already. You can set the prizemode from admin menu to Fee + Fixed or Fee + Dynamic, then the prize amount that you have set to Fixed or Dynamic is added on top of the fees. Allowing the player to set the fee when starting the race, however, should be doable. I\'ll work that in for the next version.
Reply
#27

Umm, it wouldn\'t work.

I loaded the FS and in game I get nothing.

Dunn what\'s wrong.
Reply
#28

Yagu, great work!!!
Thank you a lot.
Reply
#29

I must try this FC soon looks real good always wanted to add street races and stuff to my mode
Reply
#30

Some typos in comments:
Code:
new Prize=30000;    //Fixed prize sum (15,000$ for winner, 12,5000$ for 2nd and 10,000$ for 3rd) [Admin menu ingame]
Code:
new Prize=30000;    //Fixed prize sum (15,000$ for winner, 10,000$ for 2nd and 5,000$ for 3rd) [Admin menu ingame]
Reply
#31

D\'oh !

How i can make myself as an admin ? I cant use /raceadmin

The message: You need to be an admin
Reply
#32

Quote:
Originally Posted by traxxus
D\'oh !

How i can make myself as an admin ? I cant use /raceadmin
/rcon login <password_you_set_in_server.cfg>

Quote:
Originally Posted by Rush_iam
Some typos in comments:
Code:
new Prize=30000;    //Fixed prize sum (15,000$ for winner, 12,5000$ for 2nd and 10,000$ for 3rd) [Admin menu ingame]
Code:
new Prize=30000;    //Fixed prize sum (15,000$ for winner, 10,000$ for 2nd and 5,000$ for 3rd) [Admin menu ingame]
psht, I\'m not required to think that hard when making comments

Quote:
Originally Posted by [Fackin\'
Pyrokid ]
Umm, it wouldn\'t work.

I loaded the FS and in game I get nothing.

Dunn what\'s wrong.
Try removing all the other filterscripts, and see if it works then. If not, try with a different gamemode. If it still doesn\'t work, then it\'s pretty interesting case, assuming you have properly added it to server.cfg and copied the amx to filterscripts...
Reply
#33

CAn you make : when player type /join , for teleport to the checkpoint start?please
Reply
#34

nice it works perfectly i made my own race works fine but how do you set money on the race
Reply
#35

The prize money can be set via the /raceadmin menu.

Anyways, I\'ll write up a small update today/tomorrow, atleast allowing entry fees be set by the person doing /loadrace, saving the raceadmin-menu settings to a file so they are persistant between server restarts (without meddling with the source), and possibly a toggle for allowing players to teleport directly to the starting CP.
Reply
#36

My suggestions
1) Ability to list all available races.
2) Kicking player out of race after death.
3) Ability to kick player out of race by admin.
4) Optional kicking player out of race after leaving vehicle.
5) Ability to adjust each CP size individually.

I also agreed with player&car teleporting to start CP and setting prizes for each race.
Good luck
Reply
#37

Quote:

// Feel free to make modifications to this script, but please give credit where credit is due, and even better,
// inform me of your changes on SA-MP forum so they can be added to the \'official\' version if they are good.

Also I\'ve added notifies when any player ready/joins/leaves the race.
And changed message colors for more readability (header/first row of TOP-5/race info etc)
Reply
#38

2 more suggestions:
- do not activate CP if player is not in vehicle.
- echo notifies about saving/starting/ending races to server logs
Reply
#39

Haha very nice! Thanks man!
Reply
#40

thats hot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)