[FilterScript] Race FS + Race Editor
#1

Automatic Race Filterscript + Race Editor



Features
  • up to 50 races (precompiled version, as many as you want if you compile yourself)
  • up to 200 checkpoints per race (precompiled version, as many as you want if you compile yourself)
  • autostart races (no admin needs to be online)
  • 8 different types of vehicle classes for each race
  • ingame race editor (simple checkpoint placement without commands)
  • race file system (exchange races with friends/other servers)


Requirements

In order to use this fs you will need:
-at least samp 0.3c
-Streamer Plugin by Incognito
-sscanf 2.5 Plugin by ******



Commands

/start race

will show you the race selection




/start race
is also used to actually begin the race


/race

is used to join a race


/race editor

will start the race editor




/race settings

will show the race settings dialog.



Here you can set autostart on/off, define an autostart time, define an autoend time, define the time to join a race before it starts, and some more selfexplaining settings


/end race

will abort a race and kick all players that joined out of the race


/end redit

will close the race editor during race creation process (closes automatically after succesful race creation)


/exit

is used to exit a race


/reload races

reloads the races files (e.g. when you put some new racefiles in that folder)



Video

http://*********/1tjjFv7LgK8



Future Plans
  • Advanced race editor (edit race settings/checkpoints of an existing race)
  • New kart/mower/golfkart vehicle class
  • Kart track editor
  • Different race modes (knockout, destruction derby, chase)
  • Entry fee (maybe general or specific for every race)


Known Bugs

i hope i fixed them all
but if you find one, please post it in this thread



History
  • v 1.0 - first FS Version
  • v 1.1 - small bugfixes, command to end the raceeditor was changed to /end redit

Download & Install

In order to use this filterscript you will need to:

-add streamer plugin by Incognito to your server (link above in the requirements section)
-add sscanf2 plugin by ****** to your server (link above in the requirements section)
-compile the fs_race.pwn (only if you want to make changes in the script)
-put the fs_race.amx in your filterscripts folder
-create a subfolder called "races" in your /scriptfiles folder
-if you want to, put the race00.txt in the races folder to have a first race to look at
-add fs_race to the filterscripts being loaded in your server.cfg


These links will always provide the latest version of the filterscript.

Pastebin
Mediafire (precompiled FS with 50 races max. and 200 checkpoints per race max.)
contains:
fs_race.pwn (62KB)
fs_race.amx (181KB)
race00.txt (2KB)




For those who compile themselfes

This is the part where you can customize the script to your needs.

The most interesting point here would be the PlayerIsAdmin(playerid) part i guess.
As commented, just insert your method of checking if the player is an admin here.
Make sure to include everything you need to do so at the top of the script and there shouldn't be any problem.
At our server we use a mysql query to check if a player is an admin but i replaced it here with the IsPlayerAdmin
so it fits for everyone.

If you don't change this only RCON Admins will be able to start races, use the race editor and change the race settings.


pawn Код:
//********************************************************************
/////////////////////////////// SETTINGS /////////////////////////////
//********************************************************************

//use this to increase performance if your server has less than 500 slots or change it if your server has more than 500 slots

#undef MAX_PLAYERS
#define MAX_PLAYERS 500     //set to your max number of players


//set the maximum number of races/checkpoints to be loaded

#define MAX_RACES 50        //max number of races

#define MAX_CPS 201     //max number of checkpoints in a race

//use this function for whatever method you use to determine if a player is admin (just make sure to return true if player is admin or false if not)

PlayerIsAdmin(playerid)
{
    if(IsPlayerAdmin(playerid) == 1) return true;
    else return false;
}

//******************************************************************

////////////////////////// SETTINGS END ////////////////////////////
//******************************************************************


Credits

Incognito for his Streamer Plugin
****** for his sscanf2 Plugin



Feel free to edit to your personal needs and redistribute, as long as you give me credit for this


If you notice any bugs, or got suggestions just tell me here
Reply
#2

GG -9.99/10
Reply
#3

thx

added a small fix.

-autostart won't work if there aren't any races
-race will automatically be closed if all participants leave the race without finishing

the kart race track editor is making great progress so far
Reply
#4

Downloaded will check later and will post accordingly!
Reply
#5

Installed smoothly.

however when i made a small test race
and use auto start it would not start any race.

other issue is the starting point for my race was in ganton
but when i disabled auto start and used /start race
it spawned me to red country


but looks very nice, I did the example race first and it worked great.

and I have a question when auto race is set to on
is that for all races?

looking in the race file i get this


0.000000,0.000000,0.000000; Race Spawn


maybe this is why?>
Reply
#6

Hi, thx for that response. I looked it over and found the reason for the wrong race spawn. Had forgotten to set a MAX_CPS in the race editor sorry....

the 0.000000 at the spawn coordinates was very helpfull for that

This should be fixed by now. Just uploaded the fixed version to pastebin and mediafire.

About your autostart problem... i couldn't reproduce that

Did you get any errormessage as you started the autostart?

And the autostart will choose one of your races randomly to start. So by the time all races will be started
Reply
#7

it was because of the spawn point,
i manually edited it and restarted server.
so the auto start is working now

i will update to latest code and try some more

thk
Reply
#8

/end editor not work
Reply
#9

Thx for the report.

I had a typo in the commands part of the script.

That command has now changed to /end redit.
There should be no more problems with that once you update to the newest version


I also edited my first post and uploaded the fixed version of the script to Pastebin and Mediafire.
Reply
#10

Bug after bug

Next time you should check it before you post it
Reply
#11

Well, sometimes you miss something. but those haven't been big bugs. All fixable within 10 minutes

So have you done any scripting? Maybe you show me so i can have a look at it. Trying to find something you might have overseen
Reply
#12

Bug Bug Bug Bug
You should smash those bugs
Reply
#13

Tested, No bugs found

Great FS. (Thumb Up)
Reply
#14

More FS of Flovv will follow soon =)
Reply
#15

The self placing checkpoint system in the race builder is interesting. Haven't seen any race systems out in a while. This one looks promising.
Reply
#16

Mega cool script...
Reply
#17

Looks nice.
Reply
#18

Good job
Reply
#19

awesome just upset with auto start after 1mint

and cps are so slow it comes after 5 seconds
Reply
#20

Greate job
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)